  <template>
  <div class="pagestyle">
    <div class="head">
      <div class="tabs">
        <div
          style="cursor: pointer"
          @click="page = 1"
          :class="{ active: page == 1 }"
        >
          分站配置
        </div>
        <div
          style="cursor: pointer"
          @click="page = 2"
          :class="{ active: page == 2 }"
        >
          通道配置
        </div>
      </div>
      <div>
        <el-button type="primary" v-if="hiddDev" @click="scanDev">扫描设备</el-button>
        <el-button style="background-color: #00baad; color: #fff"
          >一键下发</el-button
        >
      </div>
    </div>
    <div class="container">
      <!-- 分站配置 -->
      <div class="info substation" v-if="page == 1">
        <div
          class="substationList"
          :class="{ openSub: hiddDev && !showcedian, openCedian: showcedian }"
        >
          <div class="list_head">
            <div class="title">
              <img src="@/assets/images/图标.svg" alt="" />
              <div style="margin: 0 0 0 8px">分站(30)</div>
            </div>
            <div class="filter">
              <el-cascader
                v-if="!showInput"
                v-model="form.stationAreaId"
                :props="props"
                :show-all-levels="false"
                :options="areaList"
                clearable
                @change="handleChange"
                size="small"
                style="width: 100px; margin: 0 20px 0 0"
                :style="{
                  margin: showcedian ? '0 8px 0 0' : '0 20px 0 0',
                  width: showcedian?'64px':'',
                }"
              />
              <el-select
                v-if="!showInput"
                clearable
                v-model="form.status"
                size="small"
                style="width: 64px"
                @change="handleChange3"
              >
                <el-option
                  v-for="item in filerArr"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                />
              </el-select>
              <img
                style="margin: 0 8px 0 20px; cursor: pointer"
                v-if="!showInput"
                @click="openSearch"
                src="@/assets/images/搜索.svg"
                alt=""
              />
              <el-input
                v-if="showInput"
                v-model="form.key"
                style="width: 160px; margin: 0 8px 0 20px"
                size="small"
                placeholder="输入编号、位置等"
                suffix-icon="Search"
                clearable
                ref="input1"
                @change="searchSatation"
                @blur="showInput = false"
              />
              <img
                src="@/assets/images/新增.svg"
                alt=""
                style="cursor: pointer"
                @click="open_add = true"
              />
              <img
                v-if="showcedian"
                src="@/assets/images/向右展开.svg"
                alt=""
                @click="closeSub"
                style="cursor: pointer"
              />
            </div>
          </div>
          <div class="list_box">
                <div
                class="item"
                v-for="(item,index) in subStationList"
                :key="item"
                :class="{yichang:item.color == '橙色',baojing:item.color == '红色',huise:item.color == '灰色',select:sIndex2 == index}"
                @mouseover="showMore = item"
                @mouseleave="showMore = null,showDetail = null,showYichang = null"
                @click="clicksSub(item,index)"
              >
                <div class="img" @click="clicksSub(item)">
                  <img
                    v-if="!item.stationTypeImagePath"
                    src="@/assets/images/分站.svg"
                    alt=""
                  />
                  <img
                    v-if="item.stationTypeImagePath"
                    :src="item.stationTypeImagePath"
                    alt=""
                    style="height: 34px; width: 27px"
                  />
                  <img @mouseover="showYichang = item" v-if="item.color == '橙色'" src="@/assets/images/异常.svg" alt="" class="yc" />
                  <img @mouseover="showYichang = item" v-if="item.color == '红色'" src="@/assets/images/报警.svg" alt="" class="yc" />
                </div>
                <div class="item_info">
                  <div class="info_name">
                    <span @click="clicksSub(item)">
                      【{{ item.stationCode }}】 {{ item.stationPlaceName }}
                    </span>
                    <div style="width:25px;height:14px;  display: flex;justify-content: flex-end;" @click="showCaozuo = item,showDetail   =null">
                      <img
                        v-if="showMore == item"
                        src="@/assets/images/更多.svg"
                        alt=""
                        
                      />
                    </div>
                  </div>
                  <div class="info_data" @click="clicksSub(item)">
                    <div class="one" :title="item.stationTypeName">
                      {{ item.stationTypeName }}
                    </div>
                    <div class="two" @mouseover="showDetail = item">
                      {{ item.channelName }}
                      <span style="color: #67c23a">{{ item.normalNum }}</span>
                      <span>/</span>
                      <span style="color: #f56c6c">{{ item.errorNum }}</span>
                      <span>/</span>
                      <span style="color: #49a6f2">{{ item.unUsedNum }}</span>
                    </div>
                  </div>
                </div>
                <!-- 操作 -->
                <div
                  class="caozuo"
                  v-if="showCaozuo == item"
                  @mouseleave="showCaozuo = null"
                >
                  <div class="selects" @click="cliclCaozuo(1, item)">
                    查看详情
                  </div>
                  <div class="selects" @click="cliclCaozuo(2)">生成模板</div>
                  <div class="selects">更换通道</div>
                  <div class="selects">版本升级</div>
                </div>
                <!-- 通道说明 -->
                <div
                  class="caozuo caozuo2"
                  v-if="showDetail == item"
                  @mouseleave="showDetail = null"
                >
                  <div class="selects2">分站测点统计</div>
                  <div class="selects2">正常 <span style="color: #67c23a">{{ item.normalNum }}</span></div>
                  <div class="selects2">异常 <span style="color: #f56c6c">{{ item.errorNum }}</span></div>
                  <div class="selects2">未配 <span style="color: #49a6f2">{{ item.unUsedNum }}</span></div>
                </div>
                <!-- 异常说明 -->
                <div
                  class="yc_show"
                  v-if="showYichang == item"
                  @mouseleave="showYichang = null"
                >
                  <div class="selects2" v-for="it in item.colorDescList" :key="it">
                    <img v-if="item.color == '橙色'" src="@/assets/images/异常.svg" alt="" class="yc" />
                    <img v-if="item.color == '红色'" src="@/assets/images/报警.svg" alt="" class="yc" />
                    {{it}}
                  </div>
                </div>
              </div>
              <div class="nodata2" v-if="subStationList.length == 0">
                <img src="@/assets/images/tabnopoint.png" alt="">
                <div>暂无数据</div>
              </div>
          </div>
        </div>
        <div class="deviceList" :class="{ hiddDev: hiddDev }">
          <div class="list_head" v-if="!hiddDev">
            <div class="title">
              <img src="@/assets/images/图标.svg" alt="" />
              <div style="margin: 0 0 0 8px">设备列表</div>
            </div>
            <div class="filter">
              <el-cascader
                v-if="!showInput2"
                v-model="form2.pointAreaId"
                :props="props"
                :show-all-levels="false"
                :options="areaList"
                clearable
                @change="handleChange2"
                size="small"
                style="width: 100px; margin: 0 20px 0 0"
              />
              <el-select
                v-if="!showInput2"
                v-model="form2.status"
                size="small"
                style="width: 64px"
                @change="handleChange4"
              >
                <el-option
                  v-for="item in filerArr"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                />
              </el-select>
              <img
                style="margin: 0 8px 0 20px"
                v-if="!showInput2"
                @click="openSearch2"
                src="@/assets/images/搜索.svg"
                alt=""
              />
              <el-input
                v-if="showInput2"
                v-model="form2.key"
                style="width: 160px; margin: 0 8px 0 20px"
                size="small"
                placeholder="请输入"
                suffix-icon="Search"
                clearable
                ref="input2"
                @change="getDevtList"
                @blur="showInput2 = false"
              />
              <img
                src="@/assets/images/向右展开.svg"
                alt=""
                @click="hiddDevice"
              />
            </div>
          </div>
          <div class="list_box" v-if="!hiddDev">
            <div class="btns">
              <el-radio-group v-model="tabPosition">
                <el-radio-button label="1">待确认</el-radio-button>
                <el-radio-button label="2"
                  >已确认 {{ devList.length }}</el-radio-button
                >
              </el-radio-group>
              <div class="shuaxin" v-if="tabPosition == 1">
                <img
                  src="@/assets/images/刷新.svg"
                  alt=""
                  style="margin: 0 8px 0 0"
                />
                刷新
              </div>
            </div>
            <div
              v-if="tabPosition == 1"
              style="
                height: calc(100% - 32px);
                display: flex;
                align-items: center;
                overflow: auto;
              "
            >
              <div class="nodata">
                <img src="@/assets/images/空白.png" alt="" />
                未搜索到设备哦~
              </div>
            </div>
            <div
              v-if="tabPosition == 2"
              style="height: calc(100% - 32px); overflow: auto"
            >
              <div class="items" v-for="item in devList" :key="item">
                <div class="one">
                  安装地点
                  <div style="width: 308px">{{ item.pointPlaceName }}</div>
                </div>
                <div class="two">
                  <img v-if="!item.pointId.includes('V')" :src="item.sensorImagePath" alt="" />
                  <div v-if="item.pointId.includes('V')" class="vName">虚拟</div>
                  <el-tag class="tags" v-if="item.pointId.includes('A')"
                    >模拟量</el-tag
                  >
                  <el-tag class="tags" v-if="item.pointId.includes('D')"
                    >开关量</el-tag
                  >
                  <el-tag class="tags" v-if="item.pointId.includes('S')"
                    >累计量</el-tag
                  >
                  <el-tag class="tags" v-if="item.pointId.includes('M')"
                    >多参量</el-tag
                  >
                  <el-tag class="tags" v-if="item.pointId.includes('V')"
                    >虚拟量</el-tag
                  >
                  <div class="two_info">
                    <div class="info1">
                      <div :title="item.sensorName">
                        【{{ item.pointId }}】{{ item.sensorName }}
                      </div>
                      <div>
                        <span>{{ item.pointValue }}</span> {{ item.sensorUnit }}
                      </div>
                    </div>
                    <div class="info2">
                      <div>设备唯一编号</div>
                      <div v-if="item.pointIdentifyingNo">{{ item.pointIdentifyingNo }}</div>
                      <div v-if="!item.pointIdentifyingNo">--</div>
                    </div>
                    <!-- <img src="@/assets/images/添加.svg" alt="" /> -->
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="ceDianList" v-if="showcedian">
          <div class="cd_head">
            <el-radio-group v-model="tabPosition2">
              <el-radio-button label="1"
                >测点 {{ pointList.length }}</el-radio-button
              >
              <el-radio-button label="2"
                >开出口 {{ controlPorts.length }}</el-radio-button
              >
            </el-radio-group>
            <div class="filter">
              <el-select
                v-model="form_point.status"
                size="small"
                style="width: 64px"
                v-if="tabPosition2 == 1"
                @change="handleChange5"
              >
                <el-option
                  v-for="item in filerArr"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                />
              </el-select>
              <img
                style="margin: 0 8px 0 20px"
                v-if="!showInput3"
                @click="openSearch3"
                src="@/assets/images/搜索.svg"
                alt=""
              />
              <el-input
                @change="handleChange6"
                v-if="showInput3"
                v-model="form_point.key"
                style="width: 160px; margin: 0 8px 0 20px"
                size="small"
                placeholder="输入编号、位置等"
                suffix-icon="Search"
                clearable
                ref="input3"
                @blur="showInput3 = false"
              />
              <img
                src="@/assets/images/新增.svg"
                alt=""
                v-if="tabPosition2 == 1"
                @click="addPointFn(1,null)"
                style="cursor: pointer;"
              />
              <div>
                <img src="@/assets/icons/svg/使用模板.svg" alt="" />
                使用模板
              </div>
            </div>
          </div>
          <div class="cd_box" v-if="tabPosition2 == 1">
            <div class="items" v-for="(item) in pointList" :key="item">
              <div class="num" :class="{num2:!item.pointCode}">{{ item.pointCode }}</div>
              <div class="cgq_img" v-if="item.pointId != null">
                <img
                  v-if="!item.pointId.includes('V')"
                  :src="item.sensorImagePath"
                  alt=""
                />
                <div v-if="item.pointId.includes('V')" class="vName">虚拟</div>
              </div>
              <div class="items_info" v-if="item.pointId != null">
                <div class="one" @click="openPointEdit(item)">
                  {{ item.pointId }} {{ item.pointPlaceName }}
                </div>
                <div class="two">
                  <el-tag style="height: 16px; margin: 0 8px 0 0" >{{
                    item.pointTypeName
                  }}</el-tag>
                  <el-tag
                    :type="item.isAlarm?'':'info'"
                    style="height: 16px; margin: 0 8px 0 0"
                    @click="openPointEdit(item,1)">报警配置 +</el-tag
                  >
                  <el-tag
                    :type="item.isGrand?'':'info'"
                    style="height: 16px; margin: 0 8px 0 0"
                    @click="openPointEdit(item,2)">分级报警 +</el-tag
                  >
                  <el-tag :type="item.isCut?'':'info'" style="height: 16px"
                    @click="openPointEdit(item,3)">断电配置 +</el-tag
                  >
                </div>
              </div>
              <el-tag effect="dark" v-if="item.statusName == '正常' && item.pointId != null" type="success" style="height: 16px">{{
                item.statusName
              }}</el-tag>
              <el-tag effect="dark" v-if="item.statusName == '标校中' && item.pointId != null" type="warning" style="height: 16px">{{
                item.statusName
              }}</el-tag>
              <el-tag effect="dark" v-if="item.statusName == '异常' && item.pointId != null" type="danger" style="height: 16px">{{
                item.statusName
              }}</el-tag>
              <div class="data" v-if="item.pointId != null">
                <div>{{ item.sensorName }}</div>
                <div>
                  <span :style="{color:item.statusName == '异常'?'#f56c6c':''}">{{ item.pointValue }}</span
                  >{{ item.sensorUnit }}
                </div>
              </div>
              <div class="btn" v-if="item.needConfirm && item.pointId != null">确认</div>
              <div class="btn zhijian" v-if="item.statusName == '异常' && item.pointId != null">智检</div>
              <div class="btn2" v-if="!item.needConfirm && item.statusName != '异常' && item.pointId != null"></div>
              <div class="add" @click="addPointFn(null,item)" v-if="item.pointId == null">
                <el-icon color="#409eff"><Plus /></el-icon>添加
              </div>
              <div
                class="type_box"
                v-if="showPointAdd == item"
                @mouseleave="showPointAdd = null"
              >
                <div
                  class="t_item"
                  @click="open_addPoint(1, subStationInfo.stationCode,item.pointCode)"
                >
                  新增普通测点
                </div>
                <div
                  class="t_item"
                  @click="open_addPoint(3, subStationInfo.stationCode)"
                >
                  新增虚拟测点
                </div>
                <div
                  class="t_item"
                  @click="open_addPoint(2, subStationInfo.stationCode)"
                >
                  新增多参测点
                </div>
              </div>
            </div>
              <div
                class="type_box newPos"
                v-if="showPointAdd2 == true"
                @mouseleave="showPointAdd2 = false"
              >
                <div
                  class="t_item"
                  @click="open_addPoint(1, subStationInfo.stationCode)"
                >
                  新增普通测点
                </div>
                <div
                  class="t_item"
                  @click="open_addPoint(3, subStationInfo.stationCode)"
                >
                  新增虚拟测点
                </div>
                <div
                  class="t_item"
                  @click="open_addPoint(2, subStationInfo.stationCode)"
                >
                  新增多参测点
                </div>
              </div>
          </div>
          <div class="cd_box" v-if="tabPosition2 == 2">
            <div
              class="items items2"
              v-for="(item, index) in controlPorts"
              :key="item"
            >
              <div class="num">{{ index + 1 }}</div>
              <div class="infos infos1" v-if="item.controlPortType != null">
                <div class="one">控制设备</div>
                <div class="two">
                  {{ item.controlPortTypeName }}
                </div>
              </div>
              <div class="infos infos2" v-if="item.controlPortType != null">
                <div class="one">安装地点</div>
                <div class="two">
                  {{ item.pointPlaceName }}
                </div>
              </div>
              <div class="infos infos3" v-if="item.controlPortType != null">
                <div class="one">馈电测点</div>
                <div class="two" v-if="item.feedPointId != null">
                  {{ item.feedPointId }}/{{ item.feedSensorName }}/{{
                    item.pointPlaceName
                  }}
                </div>
                <div class="two" v-if="item.feedPointId == null">-</div>
              </div>
              <div class="infos" v-if="item.controlPortType != null">
                <div class="one">地理位置</div>
                <div class="two" v-if="item.locationX != null">
                  X:{{ item.locationX }} Y:{{ item.locationY }} Z:{{
                    item.locationZ
                  }}
                </div>
                <div class="two" v-if="item.locationX == null">-</div>
              </div>
              <div class="xq" v-if="item.controlPortType != null" @click="openControlPorts(item)">详情</div>
              <div v-if="item.controlPortType == null" class="add" @click="openControlPorts(item)">
                <el-icon color="#409eff"><Plus /></el-icon>新增
              </div>
            </div>
          </div>
        </div>
      </div>
      <!-- 分站查看详情 -->
      <el-drawer v-model="open_detail" custom-class="detail" close-on-click-modal :modal="true">
        <template #header>
          <div class="d_header">
            <div class="title">
              <img src="@/assets/images/图标.svg" alt="" />
              <div style="margin: 0 0 0 8px">
                {{ subStationInfo.stationCode }}
              </div>
            </div>
          </div>
        </template>
        <template #default>
          <div class="detail_box">
            <div class="basic_info">
              <div class="location">
                <img
                  src="@/assets/images/home/位置.svg"
                  alt=""
                  style="margin: 0 4px 0 0"
                />
                {{ subStationInfo.stationPlaceName }}
              </div>
              <div class="line"></div>
              <div class="info_data">
                <div class="img_box">
                  <img :src="subStationInfo.stationTypeImagePath" alt="" />
                  <div class="name">{{ subStationInfo.stationTypeName }}</div>
                  <div class="vision">{{ subStationInfo.stationVersion }}</div>
                </div>
                <div class="data_box">
                  <div class="data_row">
                    <div class="data_item" style="margin: 0 70px 0 0">
                      <div class="item_title">输入口数量/开出口数量</div>
                      <div>
                        {{ subStationInfo.stationInNum }}/{{
                          subStationInfo.stationOutNum
                        }}
                      </div>
                    </div>
                    <div class="data_item" style="margin: 0 160px 0 0">
                      <div class="item_title">分站模式</div>
                      <div>{{ subStationInfo.stationModelName }}</div>
                    </div>
                    <div class="data_item">
                      <div class="item_title">IP:端口</div>
                      <div>
                        {{ subStationInfo.ipAddr }}:{{ subStationInfo.ipPort }}
                      </div>
                    </div>
                  </div>
                  <div class="data_row">
                    <div class="data_item" style="margin: 0 107px 0 0">
                      <div class="item_title">通道</div>
                      <div style="color: rgba(64, 158, 255, 1)">
                        {{ subStationInfo.channelNo }}(巡检周期:10秒)
                      </div>
                    </div>
                    <div class="data_item" style="margin: 0 34px 0 0">
                      <div class="item_title">所在区域</div>
                      <div>{{ subStationInfo.stationAreaName }}</div>
                    </div>
                    <div class="data_item">
                      <div class="item_title">安装时刻</div>
                      <div>{{ subStationInfo.createTime }}</div>
                    </div>
                  </div>
                  <div class="data_row">
                    <div class="data_item" style="margin: 0 120px 0 0">
                      <div class="item_title">设备唯一编号</div>
                      <div>{{ subStationInfo.identifyingNo }}</div>
                    </div>
                    <div class="data_item">
                      <div class="item_title">应用场景</div>
                      <div>{{ subStationInfo.applicationScene }}</div>
                    </div>
                  </div>
                  <div class="data_row">
                    <div class="data_item">
                      <div class="item_title">地理位置</div>
                      <div
                        style="color: rgba(64, 158, 255, 1)"
                        v-if="subStationInfo.locationX"
                      >
                        {{ subStationInfo.locationX }}，{{
                          subStationInfo.locationY
                        }}，{{ subStationInfo.locationZ }}
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="others">
              <el-tabs v-model="activeName" class="demo-tabs">
                <el-tab-pane name="1">
                  <template #label>
                    <div class="custom-tabs-label">
                      <span>关联电源</span>
                      <img src="@/assets/images/校验.svg" alt="" />
                    </div>
                  </template>
                  <div class="tabs_box one">
                    <div class="data_row">
                      <div class="data_item">
                        <div
                          class="item_title"
                          style="color: rgba(62, 70, 79, 1)"
                        >
                          中央变电所电源1
                          <el-tag
                            effect="dark"
                            type="success"
                            style="width: 44px; height: 16px"
                            >直流电</el-tag
                          >
                        </div>
                        <div>40/6</div>
                      </div>
                      <div class="data_item">
                        <div class="item_title">电源状态</div>
                        <div style="color: rgba(64, 158, 255, 1)">充电中</div>
                      </div>
                      <div class="data_item">
                        <div class="item_title">电源类型</div>
                        <div>KDW660-29BJ-电源分站</div>
                      </div>
                      <div class="data_item">
                        <div class="item_title">电源号</div>
                        <div>1号电源</div>
                      </div>
                      <div class="data_item" style="width: 46px">
                        <div style="color: rgba(64, 158, 255, 1)">
                          收起 <el-icon><ArrowUp /></el-icon>
                        </div>
                      </div>
                    </div>
                    <div class="data_row">
                      <div class="data_item">
                        <div class="item_title">最近充电时刻</div>
                        <div>2024-5-9 17:19:33</div>
                      </div>
                      <div class="data_item">
                        <div class="item_title">最近充电状态</div>
                        <div>1小时</div>
                      </div>
                      <div class="data_item">
                        <div class="item_title">最近放电时刻</div>
                        <div>2024-5-9 17:19:33</div>
                      </div>
                      <div class="data_item">
                        <div class="item_title">最近放电时长</div>
                        <div>1小时</div>
                      </div>
                      <div style="width: 46px"></div>
                    </div>
                    <div class="data_row">
                      <div class="data_item">
                        <div class="item_title">历史充放电</div>
                        <div style="color: rgba(64, 158, 255, 1)">查看</div>
                      </div>
                      <div class="data_item">
                        <div class="item_title">关联测点</div>
                        <div style="color: rgba(64, 158, 255, 1)">查看</div>
                      </div>
                      <div class="data_item">
                        <div class="item_title">放电时刻门限</div>
                        <div>1小时</div>
                      </div>
                      <div class="data_item">
                        <div class="item_title">容量门限</div>
                        <div>20%</div>
                      </div>
                      <div style="width: 46px"></div>
                    </div>
                    <div class="data_row">
                      <div class="data_item">
                        <div class="item_title">电源路数</div>
                        <div>六路电源</div>
                      </div>
                      <div class="data_item">
                        <div class="item_title">程序版本</div>
                        <div>1.0.01</div>
                      </div>
                      <div class="data_item">
                        <div class="item_title">安装时刻</div>
                        <div>2024-5-9 17:19:33</div>
                      </div>
                      <div class="data_item"></div>
                      <div style="width: 46px"></div>
                    </div>
                  </div>
                </el-tab-pane>
                <el-tab-pane label="其他配置" name="2">
                  <div class="tabs_box two">
                    <div class="items">
                      <div>无主断电</div>
                      <el-switch
                        v-model="subStationInfo.isPlaceotherBreakfalg"
                        disabled
                      />
                    </div>
                    <div class="items">
                      <div>瓦斯抽放</div>
                      <el-switch
                        v-model="subStationInfo.isGasDrainage"
                        disabled
                      />
                    </div>
                    <div class="items">
                      <div>以太网</div>
                      <el-switch v-model="subStationInfo.isNetwork" disabled />
                    </div>
                    <div class="items">
                      <div>禁止非即插即用传感器</div>
                      <el-switch
                        v-model="subStationInfo.noOldprotocolSensor"
                        disabled
                      />
                    </div>
                    <div class="items">
                      <div>续传</div>
                      <el-switch
                        v-model="subStationInfo.continuation"
                        disabled
                      />
                    </div>
                    <div class="items">
                      <div>测点断线断电</div>
                      <el-switch
                        v-model="subStationInfo.pointCutBroken"
                        disabled
                      />
                    </div>
                  </div>
                </el-tab-pane>
                <el-tab-pane label="操作日志" name="3">
                  <div class="tabs_box three">
                    <div class="three_header">
                      <div class="header_item">
                        <div style="margin: 0 12px 0 0">操作模块</div>
                        <el-input
                          v-model="input"
                          clearable
                          style="width: 82px"
                          placeholder="请输入"
                        />
                      </div>
                      <div class="header_item">
                        <div style="margin: 0 12px 0 0">操作人</div>
                        <el-select
                          v-model="value"
                          clearable
                          placeholder="请选择"
                          style="width: 82px"
                        >
                          <el-option
                            v-for="item in options"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          />
                        </el-select>
                      </div>
                      <div class="header_item">
                        <div style="margin: 0 12px 0 0">时刻</div>
                        <el-date-picker
                          clearable
                          style="width: 320px"
                          v-model="value2"
                          type="datetimerange"
                          :shortcuts="shortcuts"
                          range-separator="-"
                          start-placeholder="开始时间"
                          end-placeholder="结束时间"
                        />
                      </div>
                      <div class="btns">
                        <el-button type="primary" style="width: 64px"
                          >查询</el-button
                        >
                        <el-button style="width: 64px">重置</el-button>
                      </div>
                    </div>
                    <el-table
                      :data="tableData"
                      stripe
                      class="table"
                      :header-row-style="{ backgroundColor: '#e3effe' }"
                      :header-cell-style="{
                        backgroundColor: '#e3effe !important',
                      }"
                      max-height="256px"
                    >
                      <el-table-column
                        show-overflow-tooltip
                        prop="address"
                        label="操作时刻"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="work"
                        label="操作类型"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="pipei"
                        label="操作模块"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="pipei"
                        label="操作内容"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="pipei"
                        label="操作结果"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="pipei"
                        label="操作人"
                      />
                    </el-table>
                  </div>
                </el-tab-pane>
              </el-tabs>
            </div>
          </div>
        </template>
        <template #footer>
          <div class="footer_btns">
            <div>
              <el-button type="danger">删除节点</el-button>
            </div>
            <div>
              <el-button @click="open_detail = false">取消</el-button>
              <el-button type="primary" @click="open_editModal">编辑</el-button>
              <el-button style="background-color: #00baad; color: #fff"
                >一键下发</el-button
              >
            </div>
          </div>
        </template>
      </el-drawer>
      <!-- 分站新增 -->
      <el-drawer v-model="open_add" custom-class="edit" @close="form_add = {}" close-on-click-modal :modal="true">
        <template #header>
          <div class="d_header">
            <div class="title">
              <img src="@/assets/images/图标.svg" alt="" />
              <div style="margin: 0 0 0 8px">分站详情</div>
            </div>
          </div>
        </template>
        <template #default>
          <div class="edit_box">
            <div class="basic_info">
              <el-form
                :model="form_add"
                label-width="auto"
                label-position="top"
                :rules="rules"
                ref="formA"
              >
                <el-row :gutter="16">
                  <el-col :span="6">
                    <el-form-item label="分站编号" prop="stationCode">
                      <div class="data_item">
                        <el-select
                          style="width: 200px"
                          clearable
                          filterable
                          v-model="form_add.stationCode"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in ationNosList"
                            :key="item"
                            :label="item"
                            :value="item"
                          >
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="分站类型" prop="stationTypeId">
                      <div class="data_item">
                        <el-select
                          style="width: 200px"
                          clearable
                          filterable
                          v-model="form_add.stationTypeId"
                          placeholder="请选择"
                          @change="stationTypeChange"
                        >
                          <el-option
                            v-for="item in substationType"
                            :key="item.id"
                            :label="item.stationTypeName"
                            :value="item.id"
                          >
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="输入口数量">
                      <div class="data_item">
                        <el-input
                          disabled
                          v-model="form_add.stationInNum"
                          style="width: 200px"
                          placeholder="请输入"
                        />
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="分站模式">
                      <div class="data_item">
                        <el-input
                          disabled
                          v-model="form_add.stationModelName"
                          style="width: 200px"
                          placeholder="请输入"
                        />
                      </div>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row :gutter="16">
                  <el-col :span="12">
                    <el-form-item label="安装地点" prop="stationPlaceName">
                      <div class="data_item">
                        <el-select
                          clearable
                          filterable
                          allow-create
                          style="width: 416px"
                          v-model="form_add.stationPlaceName"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in addressInfoList"
                            :key="item.id"
                            :label="item.placeName"
                            :value="item.placeName"
                          >
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="所在区域" prop="stationAreaId">
                      <div class="data_item">
                        <el-cascader
                          v-model="form_add.stationAreaId"
                          style="width: 416px"
                          :options="searchTreeList"
                          clearable
                          :props="{
                            children: 'childList',
                            value: 'id',
                            label: 'areaName',
                            emitPath: false,
                            checkStrictly: true,
                          }"
                        />
                      </div>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row :gutter="16">
                  <el-col :span="6">
                    <el-form-item label="IP" prop="ipAddr">
                      <div class="data_item">
                        <el-input
                          v-model="form_add.ipAddr"
                          style="width: 200px"
                          placeholder="请输入"
                        />
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="端口" prop="ipPort">
                      <div class="data_item">
                        <el-input
                          v-model="form_add.ipPort"
                          style="width: 200px"
                          placeholder="请输入"
                        />
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="通道号">
                      <div class="data_item">
                        <el-select
                          class="w100"
                          clearable
                          filterable
                          allow-create
                          v-model="form_add.channelNo"
                          placeholder="请选择"
                          @change="channelNoChange"
                        >
                          <el-option
                            v-for="item in channelNoList"
                            :key="item.id"
                            :label="item.name"
                            :value="item.id"
                          >
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="设备唯一编号">
                      <div class="data_item">
                        <el-input
                          v-model="form_add.identifyingNo"
                          style="width: 200px"
                          placeholder="请输入"
                        />
                      </div>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row :gutter="16">
                  <el-col :span="12">
                    <el-form-item>
                      <div class="data_item">
                        <div>
                          地理位置
                          <span style="color: rgba(64, 158, 255, 1)"
                            >GIS获取</span
                          >
                        </div>
                        <div class="fbc">
                          <el-input
                            v-model="form_add.locationX"
                            oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
  '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
  .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
  .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                          >
                            <template #prefix>
                              <span>X</span>
                            </template>
                          </el-input>
                          <el-input
                            v-model="form_add.locationY"
                            oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
  '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
  .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
  .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                          >
                            <template #prefix>
                              <span>Y</span>
                            </template>
                          </el-input>
                          <el-input
                            v-model="form_add.locationZ"
                            oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
  '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
  .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
  .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                          >
                            <template #prefix>
                              <span>Z</span>
                            </template>
                          </el-input>
                        </div>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12"> </el-col>
                </el-row>
              </el-form>
            </div>
            <div class="others">
              <el-tabs v-model="activeName" class="demo-tabs2">
                <el-tab-pane name="1">
                  <template #label>
                    <div class="custom-tabs-label">
                      <span>关联电源</span>
                    </div>
                  </template>
                  <div class="tabs_box one">
                    <!-- <div class="header">
                      <div class="header_item">
                        <div style="margin: 0 12px 0 0">电源路数</div>
                        <el-input
                          v-model="input"
                          clearable
                          style="width: 132px"
                          placeholder="请输入"
                        />
                      </div>
                      <div class="header_item">
                        <div style="margin: 0 12px 0 0">电源模板</div>
                        <el-select
                          v-model="value"
                          clearable
                          placeholder="请选择"
                          style="width: 132px"
                        >
                          <el-option
                            v-for="item in options"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          />
                        </el-select>
                      </div>
                      <div class="header_item">
                        <div style="margin: 0 12px 0 0">关联状态</div>
                        <el-select
                          v-model="value"
                          clearable
                          placeholder="请选择"
                          style="width: 132px"
                        >
                          <el-option
                            v-for="item in options"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          />
                        </el-select>
                      </div>
                      <div class="btns">
                        <el-button type="primary" style="width: 64px"
                          >查询</el-button
                        >
                        <el-button style="width: 64px">重置</el-button>
                      </div>
                      <div class="addbtn">
                        <el-icon><Plus /></el-icon> 新增
                      </div>
                    </div>
                    <el-table
                      :data="tableData"
                      stripe
                      class="table"
                      :header-row-style="{ backgroundColor: '#e3effe' }"
                      :header-cell-style="{
                        backgroundColor: '#e3effe !important',
                      }"
                      max-height="256px"
                    >
                      <el-table-column type="selection" width="55" />
                      <el-table-column
                        show-overflow-tooltip
                        prop="address"
                        label="电源名称"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="work"
                        label="电源类型"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="pipei"
                        label="电源号"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="pipei"
                        label="已关联分站"
                      />
                    </el-table> -->
                  </div>
                </el-tab-pane>
                <el-tab-pane label="其他配置" name="2">
                  <div class="tabs_box two">
                    <div class="items">
                      <div>无主断电</div>
                      <el-switch v-model="form_add.isPlaceotherBreakfalg" />
                    </div>
                    <div class="items">
                      <div>瓦斯抽放</div>
                      <el-switch v-model="form_add.isGasDrainage" />
                    </div>
                    <div class="items">
                      <div>以太网</div>
                      <el-switch v-model="form_add.isNetwork" />
                    </div>
                    <div class="items">
                      <div>禁止非即插即用传感器</div>
                      <el-switch v-model="form_add.noOldprotocolSensor" />
                    </div>
                    <div class="items">
                      <div>续传</div>
                      <el-switch v-model="form_add.continuation" />
                    </div>
                    <div class="items">
                      <div>测点断线断电</div>
                      <el-switch v-model="form_add.pointCutBroken" />
                    </div>
                  </div>
                </el-tab-pane>
                <el-tab-pane label="操作日志" name="3">
                  <div class="tabs_box three">
                    <!-- <div class="header">
                      <div class="header_item">
                        <div style="margin: 0 12px 0 0">操作模块</div>
                        <el-input
                          v-model="input"
                          clearable
                          style="width: 82px"
                          placeholder="请输入"
                        />
                      </div>
                      <div class="header_item">
                        <div style="margin: 0 12px 0 0">操作人</div>
                        <el-select
                          v-model="value"
                          clearable
                          placeholder="请选择"
                          style="width: 82px"
                        >
                          <el-option
                            v-for="item in options"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          />
                        </el-select>
                      </div>
                      <div class="header_item">
                        <div style="margin: 0 12px 0 0">时刻</div>
                        <el-date-picker
                          clearable
                          style="width: 320px"
                          v-model="value2"
                          type="datetimerange"
                          :shortcuts="shortcuts"
                          range-separator="-"
                          start-placeholder="开始时间"
                          end-placeholder="结束时间"
                        />
                      </div>
                      <div class="btns">
                        <el-button type="primary" style="width: 64px"
                          >查询</el-button
                        >
                        <el-button style="width: 64px">重置</el-button>
                      </div>
                    </div>
                    <el-table
                      :data="tableData"
                      stripe
                      class="table"
                      :header-row-style="{ backgroundColor: '#e3effe' }"
                      :header-cell-style="{
                        backgroundColor: '#e3effe !important',
                      }"
                      max-height="256px"
                    >
                      <el-table-column
                        show-overflow-tooltip
                        prop="address"
                        label="操作时刻"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="work"
                        label="操作类型"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="pipei"
                        label="操作模块"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="pipei"
                        label="操作内容"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="pipei"
                        label="操作结果"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="pipei"
                        label="操作人"
                      />
                    </el-table> -->
                  </div>
                </el-tab-pane>
              </el-tabs>
            </div>
          </div>
        </template>
        <template #footer>
          <div class="footer_btns">
            <div></div>
            <div>
              <el-button @click="open_add = false">取消</el-button>
              <el-button type="primary" @click="saveAdd">确定</el-button>
              <el-button disabled style="background-color: #00baad; color: #fff"
                >一键下发</el-button
              >
            </div>
          </div>
        </template>
      </el-drawer>
      <!-- 分站编辑 -->
      <el-drawer
        v-model="open_edit"
        custom-class="edit"
        @close="form_edit = {}"
        close-on-click-modal :modal="true"
      >
        <template #header>
          <div class="d_header">
            <div class="title">
              <img src="@/assets/images/图标.svg" alt="" />
              <div style="margin: 0 0 0 8px">
                分站编号{{ form_edit.stationCode }}
              </div>
            </div>
          </div>
        </template>
        <template #default>
          <div class="edit_box">
            <div class="basic_info">
              <el-form
                :model="form_edit"
                label-width="auto"
                label-position="top"
                :rules="rules"
                ref="formE"
              >
                <el-row :gutter="16">
                  <el-col :span="6">
                    <el-form-item label="分站编号" prop="stationCode">
                      <div class="data_item">
                        <el-select
                          style="width: 200px"
                          clearable
                          filterable
                          v-model="form_edit.stationCode"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in ationNosList"
                            :key="item"
                            :label="item"
                            :value="item"
                          >
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="分站类型" prop="stationTypeId">
                      <div class="data_item">
                        <el-select
                          style="width: 200px"
                          clearable
                          filterable
                          v-model="form_edit.stationTypeId"
                          placeholder="请选择"
                          @change="stationTypeChange"
                        >
                          <el-option
                            v-for="item in substationType"
                            :key="item.id"
                            :label="item.stationTypeName"
                            :value="item.id"
                          >
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="输入口数量">
                      <div class="data_item">
                        <el-input
                          disabled
                          v-model="form_edit.stationInNum"
                          style="width: 200px"
                          placeholder="请输入"
                        />
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="分站模式">
                      <div class="data_item">
                        <el-input
                          disabled
                          v-model="form_edit.stationModelName"
                          style="width: 200px"
                          placeholder="请输入"
                        />
                      </div>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row :gutter="16">
                  <el-col :span="12">
                    <el-form-item label="安装地点" prop="stationPlaceName">
                      <div class="data_item">
                        <el-select
                          clearable
                          filterable
                          allow-create
                          style="width: 416px"
                          v-model="form_edit.stationPlaceName"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in addressInfoList"
                            :key="item.id"
                            :label="item.placeName"
                            :value="item.placeName"
                          >
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="所在区域" prop="stationAreaId">
                      <div class="data_item">
                        <el-cascader
                          v-model="form_edit.stationAreaId"
                          style="width: 416px"
                          :options="searchTreeList"
                          clearable
                          :props="{
                            children: 'childList',
                            value: 'id',
                            label: 'areaName',
                            emitPath: false,
                            checkStrictly: true,
                          }"
                        />
                      </div>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row :gutter="16">
                  <el-col :span="6">
                    <el-form-item label="IP" prop="ipAddr">
                      <div class="data_item">
                        <el-input
                          v-model="form_edit.ipAddr"
                          style="width: 200px"
                          placeholder="请输入"
                        />
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="端口" prop="ipPort">
                      <div class="data_item">
                        <el-input
                          v-model="form_edit.ipPort"
                          style="width: 200px"
                          placeholder="请输入"
                        />
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="通道号">
                      <div class="data_item">
                        <el-select
                          class="w100"
                          clearable
                          filterable
                          allow-create
                          v-model="form_edit.channelNo"
                          placeholder="请选择"
                          @change="channelNoChange"
                        >
                          <el-option
                            v-for="item in channelNoList"
                            :key="item.id"
                            :label="item.name"
                            :value="item.id"
                          >
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="设备唯一编号">
                      <div class="data_item">
                        <el-input
                          v-model="form_edit.identifyingNo"
                          style="width: 200px"
                          placeholder="请输入"
                        />
                      </div>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row :gutter="16">
                  <el-col :span="12">
                    <el-form-item>
                      <div class="data_item">
                        <div>
                          地理位置
                          <span style="color: rgba(64, 158, 255, 1)"
                            >GIS获取</span
                          >
                        </div>
                        <div class="fbc">
                          <el-input
                            v-model="form_edit.locationX"
                            oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
  '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
  .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
  .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                          >
                            <template #prefix>
                              <span>X</span>
                            </template>
                          </el-input>
                          <el-input
                            v-model="form_edit.locationY"
                            oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
  '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
  .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
  .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                          >
                            <template #prefix>
                              <span>Y</span>
                            </template>
                          </el-input>
                          <el-input
                            v-model="form_edit.locationZ"
                            oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
  '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
  .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
  .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                          >
                            <template #prefix>
                              <span>Z</span>
                            </template>
                          </el-input>
                        </div>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12"> </el-col>
                </el-row>
              </el-form>
            </div>
            <div class="others">
              <el-tabs v-model="activeName" class="demo-tabs2">
                <el-tab-pane name="1">
                  <template #label>
                    <div class="custom-tabs-label">
                      <span>关联电源</span>
                    </div>
                  </template>
                  <div class="tabs_box one">
                    <!-- <div class="header">
                      <div class="header_item">
                        <div style="margin: 0 12px 0 0">电源路数</div>
                        <el-input
                          v-model="input"
                          clearable
                          style="width: 132px"
                          placeholder="请输入"
                        />
                      </div>
                      <div class="header_item">
                        <div style="margin: 0 12px 0 0">电源模板</div>
                        <el-select
                          v-model="value"
                          clearable
                          placeholder="请选择"
                          style="width: 132px"
                        >
                          <el-option
                            v-for="item in options"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          />
                        </el-select>
                      </div>
                      <div class="header_item">
                        <div style="margin: 0 12px 0 0">关联状态</div>
                        <el-select
                          v-model="value"
                          clearable
                          placeholder="请选择"
                          style="width: 132px"
                        >
                          <el-option
                            v-for="item in options"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          />
                        </el-select>
                      </div>
                      <div class="btns">
                        <el-button type="primary" style="width: 64px"
                          >查询</el-button
                        >
                        <el-button style="width: 64px">重置</el-button>
                      </div>
                      <div class="addbtn">
                        <el-icon><Plus /></el-icon> 新增
                      </div>
                    </div>
                    <el-table
                      :data="tableData"
                      stripe
                      class="table"
                      :header-row-style="{ backgroundColor: '#e3effe' }"
                      :header-cell-style="{
                        backgroundColor: '#e3effe !important',
                      }"
                      max-height="256px"
                    >
                      <el-table-column type="selection" width="55" />
                      <el-table-column
                        show-overflow-tooltip
                        prop="address"
                        label="电源名称"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="work"
                        label="电源类型"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="pipei"
                        label="电源号"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="pipei"
                        label="已关联分站"
                      />
                    </el-table> -->
                  </div>
                </el-tab-pane>
                <el-tab-pane label="其他配置" name="2">
                  <div class="tabs_box two">
                    <div class="items">
                      <div>无主断电</div>
                      <el-switch v-model="form_edit.isPlaceotherBreakfalg" />
                    </div>
                    <div class="items">
                      <div>瓦斯抽放</div>
                      <el-switch v-model="form_edit.isGasDrainage" />
                    </div>
                    <div class="items">
                      <div>以太网</div>
                      <el-switch v-model="form_edit.isNetwork" />
                    </div>
                    <div class="items">
                      <div>禁止非即插即用传感器</div>
                      <el-switch v-model="form_edit.noOldprotocolSensor" />
                    </div>
                    <div class="items">
                      <div>续传</div>
                      <el-switch v-model="form_edit.continuation" />
                    </div>
                    <div class="items">
                      <div>测点断线断电</div>
                      <el-switch v-model="form_edit.pointCutBroken" />
                    </div>
                  </div>
                </el-tab-pane>
                <el-tab-pane label="操作日志" name="3">
                  <div class="tabs_box three">
                    <!-- <div class="header">
                      <div class="header_item">
                        <div style="margin: 0 12px 0 0">操作模块</div>
                        <el-input
                          v-model="input"
                          clearable
                          style="width: 82px"
                          placeholder="请输入"
                        />
                      </div>
                      <div class="header_item">
                        <div style="margin: 0 12px 0 0">操作人</div>
                        <el-select
                          v-model="value"
                          clearable
                          placeholder="请选择"
                          style="width: 82px"
                        >
                          <el-option
                            v-for="item in options"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          />
                        </el-select>
                      </div>
                      <div class="header_item">
                        <div style="margin: 0 12px 0 0">时刻</div>
                        <el-date-picker
                          clearable
                          style="width: 320px"
                          v-model="value2"
                          type="datetimerange"
                          :shortcuts="shortcuts"
                          range-separator="-"
                          start-placeholder="开始时间"
                          end-placeholder="结束时间"
                        />
                      </div>
                      <div class="btns">
                        <el-button type="primary" style="width: 64px"
                          >查询</el-button
                        >
                        <el-button style="width: 64px">重置</el-button>
                      </div>
                    </div>
                    <el-table
                      :data="tableData"
                      stripe
                      class="table"
                      :header-row-style="{ backgroundColor: '#e3effe' }"
                      :header-cell-style="{
                        backgroundColor: '#e3effe !important',
                      }"
                      max-height="256px"
                    >
                      <el-table-column
                        show-overflow-tooltip
                        prop="address"
                        label="操作时刻"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="work"
                        label="操作类型"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="pipei"
                        label="操作模块"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="pipei"
                        label="操作内容"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="pipei"
                        label="操作结果"
                      />
                      <el-table-column
                        show-overflow-tooltip
                        prop="pipei"
                        label="操作人"
                      />
                    </el-table> -->
                  </div>
                </el-tab-pane>
              </el-tabs>
            </div>
          </div>
        </template>
        <template #footer>
          <div class="footer_btns">
            <div>
              <el-button type="danger">删除节点</el-button>
            </div>
            <div>
              <el-button @click="open_edit = false">取消</el-button>
              <el-button type="primary" @click="saveEdit">确定</el-button>
              <el-button disabled style="background-color: #00baad; color: #fff"
                >一键下发</el-button
              >
            </div>
          </div>
        </template>
      </el-drawer>
      <!-- 测点新增 -->
      <el-drawer 
        v-model="open_add2"
        custom-class="edit"
        @close="closeMoadl"
        close-on-click-modal :modal="true"
      >
        <template #header>
          <div class="d_header">
            <div class="title">
              <img src="@/assets/images/图标.svg" alt="" />
              <div style="margin: 0 0 0 8px">
                测点详情(所属分站{{ subStationInfo.stationCode }})
              </div>
            </div>
          </div>
        </template>
        <template #default>
          <div class="edit_box">
            <el-form
              :model="form_add2"
              label-width="auto"
              label-position="top"
              ref="formRef1"
              :rules="rules1"
            >
            <div class="basic_info2">
              <!-- <el-form
                :model="form_add2"
                label-width="auto"
                label-position="top"
                ref="formA"
              > -->
                <el-row :gutter="16">
                  <el-col :span="6">
                    <el-form-item label="测点编号" prop="pointCode">
                      <div class="data_item">
                        <el-select
                          style="width: 200px"
                          clearable
                          filterable
                          v-model="form_add2.pointCode"
                          placeholder="请选择"
                          :disabled="editpointId != null"
                        >
                          <el-option
                            v-for="item in pointNoList"
                            :key="item"
                            :label="item"
                            :value="item"
                          >
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="测点类型" prop="pointType">
                      <div class="data_item">
                        <el-select
                          clearable
                          filterable
                          style="width: 200px"
                          v-model="form_add2.pointType"
                          placeholder="请选择"
                          @change="pointTypeChange"
                          :disabled="editpointId != null"
                        >
                          <el-option
                            v-for="item in pointTypeList"
                            :key="item.value"
                            :label="item.name"
                            :value="item.value"
                          >
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12" v-if="form_add2.pointType == 1">
                    <el-form-item label="传感器名称" prop="sensorId">
                      <div class="data_item">
                        <el-cascader
                          style="width: 416px"
                          ref="cascaderValue"
                          v-model="form_add2.sensorId"
                          @change="chuangantreeChange"
                          :options="sensorIdList"
                          clearable
                          :props="{ emitPath: false }"
                        />
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12" v-if="form_add2.pointType == 2">
                    <el-form-item label="传感器名称" prop="sensorId">
                      <div class="data_item">
                        <el-select
                          style="width: 200px"
                          clearable
                          filterable
                          v-model="form_add2.sensorId"
                          placeholder="请选择"
                          @change="mulsensorIdChange"
                        >
                          <el-option
                            v-for="item in mulsensorIdList"
                            :key="item.id"
                            :label="item.sensorName"
                            :value="item.id"
                          >
                          </el-option>
                        </el-select>
                      </div>
                      <el-popover
                        placement="right"
                        :width="600"
                        trigger="hover"
                        v-if="looksensorObj"
                      >
                        <template #reference>
                          <el-button
                            type="primary"
                            link
                            style="margin-right: 16px"
                          >
                            查看传感器参数
                          </el-button>
                        </template>
                        <template #default>
                          <el-row :gutter="20" class="fac">
                            <el-col :span="4">
                              <img
                                v-if="looksensorObj.imagePath"
                                style="height: 100px; width: 100%"
                                :src="looksensorObj.imagePath"
                              />
                              <img v-else src="@/assets/images/noimg.png" />
                            </el-col>
                            <el-col :span="20">
                              <el-row :gutter="20">
                                <el-col
                                  style="font-size: 16px; font-weight: 700"
                                  :span="24"
                                >
                                  {{ looksensorObj.sensorName }}
                                </el-col>
                                <el-col
                                  :span="12"
                                  v-for="item in looksensorObj.sensorList"
                                >
                                  <span
                                    style="
                                      padding: 4px 10px;
                                      display: inline-block;
                                      background-color: rgba(242, 244, 245, 1);
                                      border-radius: 4px;
                                      margin-top: 10px;
                                    "
                                    >{{ item.name }}</span
                                  >
                                </el-col>
                              </el-row>
                            </el-col>
                          </el-row>
                        </template>
                      </el-popover>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12" v-if="form_add2.pointType == 3">
                    <el-form-item prop="templateId">
                      <label slot="label">
                        <span style="color: #f56c6c">*</span
                        ><span>模版名称</span>
                        <el-button link type="primary" style="margin-left: 5px"
                          >新增模版</el-button
                        >
                      </label>
                      <el-cascader
                        class="w100"
                        ref="templateref"
                        v-model="form_add2.templateId"
                        :options="templateTreeList"
                        clearable
                        :props="{
                          value: 'id',
                          label: 'templateName',
                          emitPath: false,
                        }"
                        @change="templateTreeChange"
                      />
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row :gutter="16">
                  <el-col :span="12">
                    <el-form-item label="安装地点" prop="pointPlaceName">
                      <div class="data_item">
                        <el-select
                          style="width: 416px"
                          clearable
                          filterable
                          allow-create
                          v-model="form_add2.pointPlaceName"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in addressInfoList"
                            :key="item.id"
                            :label="item.placeName"
                            :value="item.placeName"
                          >
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="所在区域" prop="pointAreaId"> 
                      <div class="data_item">
                        <el-cascader
                          style="width: 416px"
                          v-model="form_add2.pointAreaId"
                          :options="searchTreeList"
                          clearable
                          :props="{
                            children: 'childList',
                            value: 'id',
                            label: 'areaName',
                            emitPath: false,
                            checkStrictly: true,
                          }"
                        />
                      </div>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row :gutter="16">
                  <el-col :span="12" v-if="needPlaceType == true">
                    <el-form-item label="地点类型" prop="placeTypeId">
                      <el-select
                        style="width: 100%"
                        clearable
                        filterable
                        v-model="form_add2.placeTypeId"
                        placeholder="请选择"
                      >
                        <el-option
                          v-for="item in placeTypeIdList"
                          :key="item.id"
                          :label="item.typePlace + item.typeCode"
                          :value="item.id"
                        >
                        </el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6">
                    <el-form-item label="瓦斯抽放测点" prop="isGasDrainage">
                      <el-switch v-model="form_add2.isGasDrainage"> </el-switch>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6" v-if="form_add2.isGasDrainage">
                    <el-form-item label="瓦斯抽放监测点组别" prop="gasDrainageGroupno">
                      <el-select
                        class="w100"
                        clearable
                        filterable
                        v-model="form_add2.gasDrainageGroupno"
                        placeholder="请选择"
                      >
                        <el-option
                          v-for="item in 4"
                          :key="item"
                          :label="item"
                          :value="item"
                        >
                        </el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col
                    :span="6"
                    v-if="form_add2.calibration && form_add2.pointType != 3"
                  >
                    <el-form-item label="同步添加到标校管理" prop="isCalibration">
                      <el-switch v-model="form_add2.calibration.isCalibration">
                      </el-switch>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6" v-if="form_add2.pointType != 3 && form_add2.calibration.isCalibration">
                    <el-form-item label="标校间隔时刻(天)" prop="calibration.intervalTime">
                      <el-input
                        oninput="value=value.replace(/[^\d.]/g,'')"
                        v-model.number="form_add2.calibration.intervalTime"
                        placeholder="请输入"
                        :min="1"
                        :max="365"
                      >
                      </el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="地理位置">
                      <div class="fbc">
                        <el-input
                          v-model="form_add2.locationX"
                          oninput="value =value.replace(/[^\-\d.]/g, '').replace(/^\./g,  '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1').replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1').replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1').replace(/(\.\d{8})\d*/, '$1')"
                        >
                          <template #prefix>
                            <span>X</span>
                          </template>
                        </el-input>
                        <el-input
                          v-model="form_add2.locationY"
                          oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                        >
                          <template #prefix>
                            <span>Y</span>
                          </template>
                        </el-input>
                        <el-input
                          v-model="form_add2.locationZ"
                          oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                        >
                          <template #prefix>
                            <span>Z</span>
                          </template>
                        </el-input>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12" v-if="form_add2.pointType != 3">
                    <el-form-item label="设备唯一编号" prop="pointIdentifyingNo">
                      <el-input
                        v-model="form_add2.pointIdentifyingNo"
                        placeholder="请输入"
                      >
                      </el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
            </div>
            <!-- 多参测点 -->
              <div class="others activeNameTab" v-if="form_add2.pointType == 2" style="display:flex;">
              <el-tabs
                v-model="mulactiveNamePoint"
                class="demo-tabs w100"
                @tab-click="handleClick"
              >
                <el-tab-pane
                  v-for="(item, index) in form_add2.multiplePointBranchList"
                  :label="
                    item.childIndxName != null
                      ? item.sensorName + '-' + item.childIndexName
                      : item.sensorName
                  "
                  :name="item.sensorId"
                  :key="index"
                >
                  <el-row
                    :gutter="20"
                    v-if="mulactiveNamePoint == item.sensorId"
                  >
                    <el-col :span="24">
                      <p class="activeNameTab" style="padding-left: 0px">
                        <span
                          v-for="(point, pointIndex) in pointactiveNameList"
                          :key="point.type"
                          @click="ponitactiveNameTabClick(point.type)"
                        >
                          <span v-if="point.baohanD == 'D'">
                            <span v-if="point.needGrandalarm">
                              <span
                                class="span1"
                                :class="
                                  activeNamePoint == point.type ? 'active1' : ''
                                "
                                v-if="point.type != 4"
                                >{{ point.name }}</span
                              >
                            </span>
                            <span v-else>
                              <span
                                class="span1"
                                :class="
                                  activeNamePoint == point.type ? 'active1' : ''
                                "
                                v-if="point.type != 4 && point.type != 2"
                                >{{ point.name }}</span
                              >
                            </span>
                          </span>
                          <span v-else>
                            <span v-if="point.needGrandalarm">
                              <span
                                class="span1"
                                :class="
                                  activeNamePoint == point.type ? 'active1' : ''
                                "
                                >{{ point.name }}</span
                              >
                            </span>
                            <span v-else>
                              <span
                                class="span1"
                                :class="
                                  activeNamePoint == point.type ? 'active1' : ''
                                "
                                v-if="point.type != 2"
                                >{{ point.name }}</span
                              >
                            </span>
                          </span>
                        </span>
                      </p>
                    </el-col>
                    <el-col :span="24" class="desc_box">
                      <div v-if="activeNamePoint == 1">
                        <el-row :gutter="20" v-if="item.obj">
                          <el-col :span="8">
                            <el-form-item
                              label="报警模式"
                              :prop="`multiplePointBranchList[${index}]obj[alarmBasic.alarmType]`"
                              :rules="rules1.field_mulalarmType"
                            >
                              <el-select
                                clearable
                                filterable
                                v-model="item.obj.alarmBasic.alarmType"
                                placeholder="请选择"
                              >
                                <el-option
                                  v-for="item in alarmBasicList"
                                  :key="item.code"
                                  :label="item.name + '报警'"
                                  :value="item.code"
                                >
                                </el-option>
                              </el-select>
                            </el-form-item>
                          </el-col>
                          <el-col :span="16">
                            <el-form-item
                              label="上限报警值"
                              v-if="
                                (item.obj.alarmBasic.alarmType == 1 ||
                                  item.obj.alarmBasic.alarmType == 3) &&
                                item.baohanD != 'D'
                              "
                              :prop="`multiplePointBranchList[${index}]obj[alarmBasic.upAlarmValue]`"
                              :rules="rules1.field_mulupAlarmValue"
                            >
                              <div class="fbc">
                                <el-row :gutter="20">
                                  <el-col :span="12">
                                    <div class="fac">
                                      <span class="wn">报警值≥</span>
                                      <el-input
                                        oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                        v-model="
                                          item.obj.alarmBasic.upAlarmValue
                                        "
                                        placeholder="报警值≥"
                                      >
                                      </el-input>
                                    </div>
                                  </el-col>
                                  <el-col :span="12">
                                    <div class="fac">
                                      <span class="wn">解报值＜</span>
                                      <el-input
                                        oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                        v-model="
                                          item.obj.alarmBasic.upRelieveValue
                                        "
                                        placeholder="解报值＜"
                                      >
                                      </el-input>
                                    </div>
                                  </el-col>
                                </el-row>
                              </div>
                            </el-form-item>
                            <el-form-item
                              label="下限报警值"
                              v-if="
                                (item.obj.alarmBasic.alarmType == 2 ||
                                  item.obj.alarmBasic.alarmType == 3) &&
                                item.baohanD != 'D'
                              "
                              :prop="`multiplePointBranchList[${index}]obj[alarmBasic.downAlarmValue]`"
                              :rules="rules1.field_muldownAlarmValue"
                            >
                              <div class="fbc">
                                <el-row :gutter="20">
                                  <el-col :span="12">
                                    <div class="fac">
                                      <span class="wn">报警值≤</span>
                                      <el-input
                                        oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                        v-model="
                                          item.obj.alarmBasic.downAlarmValue
                                        "
                                        placeholder="报警值≤"
                                      >
                                      </el-input>
                                    </div>
                                  </el-col>
                                  <el-col :span="12">
                                    <div class="fac">
                                      <span class="wn">解报值＞</span>
                                      <el-input
                                        oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                        v-model="
                                          item.obj.alarmBasic.downRelieveValue
                                        "
                                        placeholder="解报值＞"
                                      >
                                      </el-input>
                                    </div>
                                  </el-col>
                                </el-row>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8">
                            <el-form-item
                              prop="hasPreAlarm"
                              label-position="left"
                            >
                              <span class="wn">预报警</span>
                              <el-switch
                                v-model="item.obj.prealarmBasic.hasPreAlarm"
                              >
                              </el-switch>
                              <el-button
                                link
                                type="primary"
                                size="small"
                                @click="hasPreAlarmdescClick"
                              >
                                全部详情
                              </el-button>
                            </el-form-item>
                          </el-col>
                          <el-col :span="16"></el-col>
                          <el-col
                            :span="24"
                            v-if="item.obj.prealarmBasic.hasPreAlarm"
                          >
                            <el-row :gutter="20">
                              <el-col :span="6">
                                <el-form-item
                                  label="上限预报值"
                                  :prop="`multiplePointBranchList[${index}]obj[prealarmBasic.upPrealarmValue]`"
                                  :rules="rules1.field_mulupPrealarmValue"
                                >
                                  <el-input
                                    oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                    v-model="
                                      item.obj.prealarmBasic.upPrealarmValue
                                    "
                                    placeholder="请输入"
                                  >
                                  </el-input>
                                </el-form-item>
                              </el-col>
                              <el-col :span="6">
                                <el-form-item
                                  label="下限预报值"
                                  :prop="`multiplePointBranchList[${index}]obj[prealarmBasic.downPrealarmValue]`"
                                  :rules="rules1.field_muldownPrealarmValue"
                                >
                                  <el-input
                                    oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                    v-model="
                                      item.obj.prealarmBasic.downPrealarmValue
                                    "
                                    placeholder="请输入"
                                  >
                                  </el-input>
                                </el-form-item>
                              </el-col>
                              <el-col :span="6">
                                <el-form-item
                                  label="超时"
                                  :prop="`multiplePointBranchList[${index}]obj[prealarmBasic.prealarmTimeout]`"
                                  :rules="rules1.field_mulprealarmTimeout"
                                >
                                  <span class="fac">
                                    <el-select
                                      clearable
                                      filterable
                                      v-model="
                                        item.obj.prealarmBasic.prealarmTimeout
                                      "
                                      placeholder="请选择"
                                    >
                                      <el-option
                                        v-for="item in prealarmTimeoutData"
                                        :key="item"
                                        :label="item + '分钟'"
                                        :value="item"
                                      >
                                      </el-option>
                                    </el-select>
                                    <span class="wn">分钟</span>
                                  </span>
                                </el-form-item>
                              </el-col>
                            </el-row>
                          </el-col>
                          <el-col :span="24">
                            <el-form-item>
                              <span>恒值预报警</span>
                              <el-switch
                                v-model="
                                  item.obj.prealarmBasic.hasConstantPreAlarm
                                "
                              >
                              </el-switch>
                              <el-button
                                link
                                type="primary"
                                size="small"
                                @click="hasConstantPreAlarmdescClick"
                              >
                                全部详情
                              </el-button>
                            </el-form-item>
                          </el-col>
                          <el-col
                            :span="8"
                            v-if="item.obj.prealarmBasic.hasConstantPreAlarm"
                          >
                            <el-form-item
                              label="恒值持续时间"
                              :prop="`multiplePointBranchList[${index}]obj[prealarmBasic.constantTime]`"
                              :rules="rules1.field_mulconstantTime"
                            >
                              <span class="fac">
                                <el-input
                                  oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                  v-model="item.obj.prealarmBasic.constantTime"
                                  placeholder="请输入"
                                >
                                </el-input>
                                <span class="wn">分钟</span>
                              </span>
                            </el-form-item>
                          </el-col>
                        </el-row>
                      </div>
                      <!-- 分级配置 -->
                      <div v-if="activeNamePoint == 2">
                        <el-row :gutter="20" v-if="item.obj">
                          <el-col :span="6">
                            <el-form-item
                              :label="
                                item.baohanD == 'D'
                                  ? '分级报警'
                                  : '上限分级报警'
                              "
                            >
                              <el-switch
                                v-model="item.obj.hasUpGrandAlarm"
                                @change="hasUpGrandAlarmChange"
                              />
                            </el-form-item>
                          </el-col>
                          <el-col :span="6" v-if="item.baohanD != 'D'">
                            <el-form-item label="下限分级报警">
                              <el-switch
                                v-model="item.obj.hasDownGrandAlarm"
                                @change="hasDownGrandAlarmChange"
                              />
                            </el-form-item>
                          </el-col>
                          <el-col :span="6">
                            <el-form-item label="启用多级报警">
                              <el-switch v-model="item.obj.hasMoreGrandAlarm" />
                            </el-form-item>
                          </el-col>
                          <el-col :span="6" v-if="item.baohanD != 'D'">
                            <el-form-item label="启用涨/跌幅">
                              <el-switch
                                v-model="item.obj.hasChangeGrandAlarm"
                              />
                            </el-form-item>
                          </el-col>
                        </el-row>
                        <el-row
                          v-if="
                            item.obj.hasUpGrandAlarm &&
                            item.obj.hasDownGrandAlarm
                          "
                        >
                          <el-radio-group v-model="radio1">
                            <el-radio-button
                              label="上限分级报警"
                              value="上限分级报警"
                            />
                            <el-radio-button
                              label="下限分级报警"
                              value="下限分级报警"
                            />
                          </el-radio-group>
                        </el-row>
                        <el-row
                          :gutter="20"
                          style="margin: 0 10px"
                          v-if="
                            radio1 == '上限分级报警' && item.obj.hasUpGrandAlarm
                          "
                        >
                          <el-row :gutter="20" v-if="item.baohanD != 'D'">
                            <el-col
                              :span="24"
                              v-if="item.obj.hasChangeGrandAlarm"
                            >
                              <p
                                class="drawer_sub_title"
                                style="margin-left: 0; padding-top: 10px"
                              >
                                <span> 变化参数设置</span>
                              </p>
                            </el-col>
                            <el-col
                              :span="8"
                              v-if="item.obj.hasChangeGrandAlarm"
                            >
                              <el-form-item
                                label="变化率判断门限≥"
                                :prop="`multiplePointBranchList[${index}]obj[upGrandalarmBasic.grandalarmRate.thresholdValue]`"
                                :rules="rules1.field_mulupthresholdValue"
                              >
                                <el-input
                                  oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                  v-model="
                                    item.obj.upGrandalarmBasic.grandalarmRate
                                      .thresholdValue
                                  "
                                  placeholder="请输入"
                                >
                                  <template #append>{{ baohanunit }}</template>
                                </el-input>
                              </el-form-item>
                            </el-col>
                            <el-col
                              :span="8"
                              v-if="item.obj.hasChangeGrandAlarm"
                            >
                              <el-form-item
                                label="变化率持续周期"
                                :prop="`multiplePointBranchList[${index}]obj[upGrandalarmBasic.grandalarmRate.rateCycle]`"
                                :rules="rules1.field_muluprateCycle"
                              >
                                <el-input
                                  oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                  v-model="
                                    item.obj.upGrandalarmBasic.grandalarmRate
                                      .rateCycle
                                  "
                                  placeholder="请输入"
                                >
                                  <template #append>秒</template>
                                </el-input>
                              </el-form-item>
                            </el-col>
                          </el-row>
                          <!-- todo -->
                          <el-row :gutter="20">
                            <el-col
                              :span="24"
                              v-if="
                                item.baohanD != 'D' &&
                                item.obj.hasMoreGrandAlarm
                              "
                            >
                              <el-row :gutter="20">
                                <el-col :span="24">
                                  <p>六级报警</p>
                                </el-col>
                                <el-col :span="8">
                                  <el-form-item label="">
                                    <div class="fac">
                                      <span class="wn">或 持续时间≤</span>
                                      <el-input
                                        oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                        v-model="
                                          item.obj.upGrandalarmBasic
                                            .grandsixTime
                                        "
                                        placeholder="请输入"
                                      >
                                        <template #append>分钟</template>
                                      </el-input>
                                    </div>
                                  </el-form-item>
                                </el-col>
                                <el-col :span="24">
                                  <p>五级报警</p>
                                </el-col>
                                <el-col :span="8">
                                  <el-form-item label="">
                                    <div class="fac">
                                      <span class="wn">或 持续时间≤</span>
                                      <el-input
                                        oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                        v-model="
                                          item.obj.upGrandalarmBasic
                                            .grandfiveTime
                                        "
                                        placeholder="请输入"
                                      >
                                        <template #append>分钟</template>
                                      </el-input>
                                    </div>
                                  </el-form-item>
                                </el-col>
                              </el-row>
                            </el-col>
                            <el-col :span="24">
                              <p>四级报警</p>
                            </el-col>
                            <el-col :span="8" v-if="item.baohanD != 'D'">
                              <el-form-item label="">
                                <div class="fac">
                                  <span class="wn">上限预报值≥</span>
                                  <el-input
                                    oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                    v-model="
                                      item.obj.upGrandalarmBasic.grandfourValue
                                    "
                                    placeholder="请输入"
                                  >
                                    <template #append>{{
                                      baohanunit
                                    }}</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col :span="8">
                              <el-form-item label="">
                                <div class="fac">
                                  <span class="wn">或 持续时间≤</span>
                                  <el-input
                                    oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                    v-model="
                                      item.obj.upGrandalarmBasic.grandfourTime
                                    "
                                    placeholder="请输入"
                                  >
                                    <template #append>分钟</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col
                              :span="8"
                              v-if="item.obj.hasChangeGrandAlarm"
                            >
                              <el-form-item
                                label=""
                                prop="upGrandalarmBasic.grandalarmRate.rateFourValue"
                              >
                                <div class="fac">
                                  <span class="wn">或 涨幅≥</span>
                                  <el-input
                                    oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                    v-model="
                                      item.obj.upGrandalarmBasic.grandalarmRate
                                        .rateFourValue
                                    "
                                    placeholder="请输入"
                                  >
                                    <template #append>{{
                                      baohanunit
                                    }}</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col :span="24">
                              <p>三级报警</p>
                            </el-col>
                            <el-col :span="8" v-if="item.baohanD != 'D'">
                              <el-form-item label="">
                                <div class="fac">
                                  <span class="wn">上限预报值≥</span>
                                  <el-input
                                    oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                    v-model="
                                      item.obj.upGrandalarmBasic.grandthreeValue
                                    "
                                    placeholder="请输入"
                                  >
                                    <template #append>{{
                                      baohanunit
                                    }}</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col :span="8">
                              <el-form-item label="">
                                <div class="fac">
                                  <span class="wn">或 持续时间≤</span>
                                  <el-input
                                    oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                    v-model="
                                      item.obj.upGrandalarmBasic.grandthreeTime
                                    "
                                    placeholder="请输入"
                                  >
                                    <template #append>分钟</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col
                              :span="8"
                              v-if="item.obj.hasChangeGrandAlarm"
                            >
                              <el-form-item
                                label=""
                                prop="upGrandalarmBasic.grandalarmRate.rateThreeValue"
                              >
                                <div class="fac">
                                  <span class="wn">或 涨幅≥</span>
                                  <el-input
                                    oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                    v-model="
                                      item.obj.upGrandalarmBasic.grandalarmRate
                                        .rateThreeValue
                                    "
                                    placeholder="请输入"
                                  >
                                    <template #append>{{
                                      baohanunit
                                    }}</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col :span="24">
                              <p>二级报警</p>
                            </el-col>
                            <el-col :span="8" v-if="item.baohanD != 'D'">
                              <el-form-item label="">
                                <div class="fac">
                                  <span class="wn">上限预报值≥</span>
                                  <el-input
                                    oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                    v-model="
                                      item.obj.upGrandalarmBasic.grandtwoValue
                                    "
                                    placeholder="请输入"
                                  >
                                    <template #append>{{
                                      baohanunit
                                    }}</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col :span="8">
                              <el-form-item>
                                <div class="fac">
                                  <span class="wn">或 持续时间≤</span>
                                  <el-input
                                    oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                    v-model="
                                      item.obj.upGrandalarmBasic.grandtwoTime
                                    "
                                    placeholder="请输入"
                                  >
                                    <template #append>分钟</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col
                              :span="8"
                              v-if="item.obj.hasChangeGrandAlarm"
                            >
                              <el-form-item
                                prop="upGrandalarmBasic.grandalarmRate.rateTwoValue"
                              >
                                <div class="fac">
                                  <span class="wn">或 涨幅≥</span>
                                  <el-input
                                    oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                    v-model="
                                      item.obj.upGrandalarmBasic.grandalarmRate
                                        .rateTwoValue
                                    "
                                    placeholder="请输入"
                                  >
                                    <template #append>{{
                                      baohanunit
                                    }}</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col :span="24">
                              <p>一级报警</p>
                            </el-col>
                            <el-col :span="8" v-if="item.baohanD != 'D'">
                              <el-form-item label="">
                                <div class="fac">
                                  <span class="wn">上限预报值≥</span>
                                  <el-input
                                    oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                    v-model="
                                      item.obj.upGrandalarmBasic.grandoneValue
                                    "
                                    placeholder="请输入"
                                  >
                                    <template #append>{{
                                      baohanunit
                                    }}</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col :span="8">
                              <el-form-item>
                                <div class="fac">
                                  <span class="wn">或 持续时间≤</span>
                                  <el-input
                                    oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                    v-model="
                                      item.obj.upGrandalarmBasic.grandoneTime
                                    "
                                    placeholder="请输入"
                                  >
                                    <template #append>分钟</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col
                              :span="8"
                              v-if="item.obj.hasChangeGrandAlarm"
                            >
                              <el-form-item>
                                <div class="fac">
                                  <span class="wn">或 涨幅≥</span>
                                  <el-input
                                    oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                    v-model="
                                      item.obj.upGrandalarmBasic.grandalarmRate
                                        .rateOneValue
                                    "
                                    placeholder="请输入"
                                  >
                                    <template #append>{{
                                      baohanunit
                                    }}</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                          </el-row>
                        </el-row>
                        <el-row
                          :gutter="20"
                          style="margin: 0 10px"
                          v-if="
                            radio1 == '下限分级报警' &&
                            item.obj.hasDownGrandAlarm
                          "
                        >
                          <el-row :gutter="20">
                            <el-col
                              :span="24"
                              v-if="item.obj.hasChangeGrandAlarm"
                            >
                              <p
                                class="drawer_sub_title"
                                style="margin-left: 0; padding-top: 10px"
                              >
                                <span> 变化参数设置</span>
                              </p>
                            </el-col>
                            <el-col
                              :span="8"
                              v-if="item.obj.hasChangeGrandAlarm"
                            >
                              <el-form-item
                                label="变化率判断门限≤"
                                :prop="`multiplePointBranchList[${index}]obj[downGrandalarmBasic.grandalarmRate.thresholdValue]`"
                                :rules="rules1.field_muldownthresholdValue"
                              >
                                <el-input
                                  oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                  v-model="
                                    item.obj.downGrandalarmBasic.grandalarmRate
                                      .thresholdValue
                                  "
                                  placeholder="请输入"
                                >
                                  <template #append>{{ baohanunit }}</template>
                                </el-input>
                              </el-form-item>
                            </el-col>
                            <el-col
                              :span="8"
                              v-if="item.obj.hasChangeGrandAlarm"
                            >
                              <el-form-item
                                label="变化率持续周期"
                                :prop="`multiplePointBranchList[${index}]obj[downGrandalarmBasic.grandalarmRate.rateCycle]`"
                                :rules="rules1.field_muldownrateCycle"
                              >
                                <el-input
                                  oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                  v-model="
                                    item.obj.downGrandalarmBasic.grandalarmRate
                                      .rateCycle
                                  "
                                  placeholder="请输入"
                                >
                                  <template #append>秒</template>
                                </el-input>
                              </el-form-item>
                            </el-col>
                          </el-row>
                          <el-row
                            :gutter="20"
                            v-if="item.obj.hasMoreGrandAlarm"
                          >
                            <el-col :span="24">
                              <p>六级报警</p>
                            </el-col>
                            <el-col :span="8">
                              <el-form-item label="" prop="noOldprotocolSensor">
                                <div class="fac">
                                  <span class="wn">下限预报值≤</span>
                                  <el-input
                                    oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                    v-model="
                                      item.obj.downGrandalarmBasic.grandsixValue
                                    "
                                    placeholder="请输入"
                                  >
                                    <template #append>{{
                                      baohanunit
                                    }}</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col :span="8">
                              <el-form-item label="">
                                <div class="fac">
                                  <span class="wn">或 持续时间≤</span>
                                  <el-input
                                    oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                    v-model="
                                      item.obj.downGrandalarmBasic.grandsixTime
                                    "
                                    placeholder="请输入"
                                  >
                                    <template #append>分钟</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col
                              :span="8"
                              v-if="item.obj.hasChangeGrandAlarm"
                            >
                              <el-form-item
                                label=""
                                prop="downGrandalarmBasic.grandalarmRate.rateSixValue"
                              >
                                <div class="fac">
                                  <span class="wn">或 跌幅≥</span>
                                  <el-input
                                    oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                    v-model="
                                      item.obj.downGrandalarmBasic
                                        .grandalarmRate.rateSixValue
                                    "
                                    placeholder="请输入"
                                  >
                                    <template #append>{{
                                      baohanunit
                                    }}</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col :span="24">
                              <p>五级报警</p>
                            </el-col>
                            <el-col :span="8">
                              <el-form-item
                                label=""
                                prop="noOldprotocolSensor"
                                v-if="item.obj.hasMoreGrandAlarm"
                              >
                                <div class="fac">
                                  <span class="wn">下限预报值≤</span>
                                  <el-input
                                    oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                    v-model="
                                      item.obj.downGrandalarmBasic
                                        .grandfiveValue
                                    "
                                    placeholder="请输入"
                                  >
                                    <template #append>{{
                                      baohanunit
                                    }}</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col :span="8">
                              <el-form-item label="">
                                <div class="fac">
                                  <span class="wn">或 持续时间≤</span>
                                  <el-input
                                    oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                    v-model="
                                      item.obj.downGrandalarmBasic.grandfiveTime
                                    "
                                    placeholder="请输入"
                                  >
                                    <template #append>分钟</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                            <el-col
                              :span="8"
                              v-if="item.obj.hasChangeGrandAlarm"
                            >
                              <el-form-item
                                label=""
                                prop="downGrandalarmBasic.grandalarmRate.rateFiveValue"
                              >
                                <div class="fac">
                                  <span class="wn">或 跌幅≥</span>
                                  <el-input
                                    oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                    v-model="
                                      item.obj.downGrandalarmBasic
                                        .grandalarmRate.rateFiveValue
                                    "
                                    placeholder="请输入"
                                  >
                                    <template #append>{{
                                      baohanunit
                                    }}</template>
                                  </el-input>
                                </div>
                              </el-form-item>
                            </el-col>
                          </el-row>
                          <el-col :span="24">
                            <p>四级报警</p>
                          </el-col>
                          <el-col :span="8">
                            <el-form-item label="" prop="noOldprotocolSensor">
                              <div class="fac">
                                <span class="wn">下限预报值≤</span>
                                <el-input
                                  oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                  v-model="
                                    item.obj.downGrandalarmBasic.grandfourValue
                                  "
                                  placeholder="请输入"
                                >
                                  <template #append>{{ baohanunit }}</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8">
                            <el-form-item label="">
                              <div class="fac">
                                <span class="wn">或 持续时间≤</span>
                                <el-input
                                  oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                  v-model="
                                    item.obj.downGrandalarmBasic.grandfourTime
                                  "
                                  placeholder="请输入"
                                >
                                  <template #append>分钟</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8" v-if="item.obj.hasChangeGrandAlarm">
                            <el-form-item
                              label=""
                              prop="downGrandalarmBasic.grandalarmRate.rateFourValue"
                            >
                              <div class="fac">
                                <span class="wn">或 跌幅≥</span>
                                <el-input
                                  oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                  v-model="
                                    item.obj.downGrandalarmBasic.grandalarmRate
                                      .rateFourValue
                                  "
                                  placeholder="请输入"
                                >
                                  <template #append>{{ baohanunit }}</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="24">
                            <p>三级报警</p>
                          </el-col>
                          <el-col :span="8">
                            <el-form-item label="">
                              <div class="fac">
                                <span class="wn">下限预报值≤</span>
                                <el-input
                                  oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                  v-model="
                                    item.obj.downGrandalarmBasic.grandthreeValue
                                  "
                                  placeholder="请输入"
                                >
                                  <template #append>{{ baohanunit }}</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8">
                            <el-form-item label="">
                              <div class="fac">
                                <span class="wn">或 持续时间≤</span>
                                <el-input
                                  oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                  v-model="
                                    item.obj.downGrandalarmBasic.grandthreeTime
                                  "
                                  placeholder="请输入"
                                >
                                  <template #append>分钟</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8" v-if="item.obj.hasChangeGrandAlarm">
                            <el-form-item
                              label=""
                              prop="downGrandalarmBasic.grandalarmRate.rateThreeValue"
                            >
                              <div class="fac">
                                <span class="wn">或 跌幅≥</span>
                                <el-input
                                  oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                  v-model="
                                    item.obj.downGrandalarmBasic.grandalarmRate
                                      .rateThreeValue
                                  "
                                  placeholder="请输入"
                                >
                                  <template #append>{{ baohanunit }}</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="24">
                            <p>二级报警</p>
                          </el-col>
                          <el-col :span="8">
                            <el-form-item label="">
                              <div class="fac">
                                <span class="wn">下限预报值≤</span>
                                <el-input
                                  oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                  v-model="
                                    item.obj.downGrandalarmBasic.grandtwoValue
                                  "
                                  placeholder="请输入"
                                >
                                  <template #append>{{ baohanunit }}</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8">
                            <el-form-item label="">
                              <div class="fac">
                                <span class="wn">或 持续时间≤</span>
                                <el-input
                                  oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                  v-model="
                                    item.obj.downGrandalarmBasic.grandtwoTime
                                  "
                                  placeholder="请输入"
                                >
                                  <template #append>分钟</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8" v-if="item.obj.hasChangeGrandAlarm">
                            <el-form-item
                              label=""
                              prop="downGrandalarmBasic.grandalarmRate.rateTwoValue"
                            >
                              <div class="fac">
                                <span class="wn">或 跌幅≥</span>
                                <el-input
                                  oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                  v-model="
                                    item.obj.downGrandalarmBasic.grandalarmRate
                                      .rateTwoValue
                                  "
                                  placeholder="请输入"
                                >
                                  <template #append>{{ baohanunit }}</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="24">
                            <p>一级报警</p>
                          </el-col>
                          <el-col :span="8">
                            <el-form-item label="" prop="noOldprotocolSensor">
                              <div class="fac">
                                <span class="wn">下限预报值≤</span>
                                <el-input
                                  oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                  v-model="
                                    item.obj.downGrandalarmBasic.grandoneValue
                                  "
                                  placeholder="请输入"
                                >
                                  <template #append>{{ baohanunit }}</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8">
                            <el-form-item label="">
                              <div class="fac">
                                <span class="wn">或 持续时间≤</span>
                                <el-input
                                  oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                  v-model="
                                    item.obj.downGrandalarmBasic.grandoneTime
                                  "
                                  placeholder="请输入"
                                >
                                  <template #append>分钟</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8" v-if="item.obj.hasChangeGrandAlarm">
                            <el-form-item
                              label=""
                              prop="downGrandalarmBasic.grandalarmRate.rateOneValue"
                            >
                              <div class="fac">
                                <span class="wn">或 跌幅≥</span>
                                <el-input
                                  oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                  v-model="
                                    item.obj.downGrandalarmBasic.grandalarmRate
                                      .rateOneValue
                                  "
                                  placeholder="请输入"
                                >
                                  <template #append>{{ baohanunit }}</template>
                                </el-input>
                              </div>
                            </el-form-item>
                          </el-col>
                        </el-row>
                      </div>
                      <!-- 普通断电 -->
                      <div v-if="activeNamePoint == 3" class="putongClass">
                        <div style="position: relative" v-if="item.obj">
                          <el-button
                            style="
                              position: absolute;
                              top: 10px;
                              right: 20px;
                              z-index: 2;
                              cursor: pointer;
                            "
                            link
                            type="primary"
                            @click="putongAddClick"
                          >
                            <el-icon>
                              <Plus /> </el-icon
                            >新增
                          </el-button>
                          <el-tabs
                            v-model="ordintranValue"
                            type="card"
                            class="demo-tabs"
                            :closable="
                              item.obj.cutValueList.length == 1 ? false : true
                            "
                            @tab-remove="removeTab"
                          >
                            <el-tab-pane
                              v-for="(cut, cutindex) in item.obj.cutValueList"
                              :key="cutindex + 1"
                              :label="'断电配置' + (cutindex + 1)"
                              :name="cutindex"
                            >
                              <el-row :gutter="20" style="margin-top: 10px">
                                <el-col :span="6">
                                  <el-form-item
                                    label="断电模式"
                                    :prop="`multiplePointBranchList[${index}][obj]cutValueList[${cutindex}][cutType]`"
                                    :rules="rules1.field_mulcutType"
                                  >
                                    <el-select
                                      clearable
                                      filterable
                                      v-model="cut.cutType"
                                      placeholder="请选择"
                                      @change="cutTypeChange"
                                    >
                                      <el-option
                                        v-for="cut in cutTypeList"
                                        :key="cut.code"
                                        :label="cut.name + '断电'"
                                        :value="cut.code"
                                      >
                                      </el-option>
                                    </el-select>
                                  </el-form-item>
                                </el-col>
                                <el-col
                                  :span="6"
                                  v-if="cut.cutType == 1 && item.baohanD != 'D'"
                                >
                                  <el-form-item
                                    label="断电值≥"
                                    :prop="`multiplePointBranchList[${index}][obj]cutValueList[${cutindex}][cutValue]`"
                                    :rules="rules1.field_mulcutValue"
                                  >
                                    <el-input
                                      v-model="cut.cutValue"
                                      oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                      placeholder="请输入"
                                    >
                                    </el-input>
                                  </el-form-item>
                                </el-col>
                                <el-col
                                  :span="6"
                                  v-if="cut.cutType == 1 && item.baohanD != 'D'"
                                >
                                  <el-form-item
                                    label="复电值＜"
                                    :prop="`multiplePointBranchList[${index}][obj]cutValueList[${cutindex}][resumeValue]`"
                                    :rules="rules1.field_mulresumeValue"
                                  >
                                    <el-input
                                      oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                      v-model="cut.resumeValue"
                                      placeholder="请输入"
                                    >
                                    </el-input>
                                  </el-form-item>
                                </el-col>
                                <el-col
                                  :span="6"
                                  v-if="cut.cutType == 2 && item.baohanD != 'D'"
                                >
                                  <el-form-item
                                    label="断电值≤"
                                    :prop="`multiplePointBranchList[${index}][obj]cutValueList[${cutindex}][cutValue]`"
                                    :rules="rules1.field_mulcutValue1"
                                  >
                                    <el-input
                                      oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                      v-model="cut.cutValue"
                                      placeholder="请输入"
                                    >
                                    </el-input>
                                  </el-form-item>
                                </el-col>
                                <el-col
                                  :span="6"
                                  v-if="cut.cutType == 2 && item.baohanD != 'D'"
                                >
                                  <el-form-item
                                    label="复电值＞"
                                    :prop="`multiplePointBranchList[${index}][obj]cutValueList[${cutindex}][resumeValue]`"
                                    :rules="rules1.field_mulresumeValue1"
                                  >
                                    <el-input
                                      oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                      v-model="cut.resumeValue"
                                      placeholder="请输入"
                                    >
                                    </el-input>
                                  </el-form-item>
                                </el-col>
                                <el-col :span="6">
                                  <el-button
                                    link
                                    type="primary"
                                    style="margin-top: 35px"
                                    @click="addcutdeviceClick"
                                  >
                                    <el-icon>
                                      <Plus /> </el-icon
                                    >断电设备
                                  </el-button>
                                </el-col>
                                <el-col :span="24" style="padding: 10px">
                                  <el-collapse
                                    v-model="collapseAtive"
                                    accordion
                                  >
                                    <el-collapse-item
                                      :name="index2"
                                      v-for="(
                                        item2, index2
                                      ) in cut.cutStationList"
                                    >
                                      <template #title>
                                        <div
                                          class="fbc w100"
                                          @click="stopCollapse"
                                        >
                                          <el-form-item
                                            :prop="`multiplePointBranchList[${index}][obj]cutValueList[${cutindex}]cutStationList[${index2}][stationPlaceName]`"
                                            :rules="
                                              rules1.field_mulstationPlaceName
                                            "
                                          >
                                            <span style="margin-top: 20px">
                                              <span>分站</span>
                                              <el-select
                                                style="margin: 0 5px"
                                                clearable
                                                filterable
                                                v-model="item2.stationPlaceName"
                                                placeholder="请选择"
                                                @change="
                                                  controlPortChange(
                                                    $event,
                                                    index2
                                                  )
                                                "
                                              >
                                                <el-option
                                                  v-for="station in stationPlaceNamList"
                                                  :key="station.stationCode"
                                                  :label="
                                                    station.stationCode +
                                                    '/' +
                                                    station.stationPlaceName
                                                  "
                                                  :value="station.stationCode"
                                                >
                                                </el-option>
                                              </el-select>
                                              <svg-icon
                                                class-name="search-icon"
                                                icon-class="delkong"
                                              />
                                            </span>
                                          </el-form-item>
                                        </div>
                                      </template>
                                      <div style="margin-top: 10px">
                                        <vxe-table
                                          border
                                          ref="tableRef"
                                          :data="item2.controlPortList"
                                          :checkbox-config="checkboxConfig"
                                          @checkbox-change="
                                            selectChangeEvent($event, index2)
                                          "
                                        >
                                          <vxe-column
                                            type="checkbox"
                                            width="60"
                                          >
                                          </vxe-column>
                                          <vxe-column
                                            field="controlPort"
                                            title="开出口号"
                                          >
                                          </vxe-column>
                                          <vxe-column
                                            field="controlPortType"
                                            title="控制设备"
                                          >
                                          </vxe-column>
                                          <vxe-column
                                            field="pointPlaceName"
                                            title="安装地点"
                                          >
                                          </vxe-column>
                                          <vxe-column
                                            field="feedPointId"
                                            title="馈电测点"
                                          >
                                          </vxe-column>
                                          <vxe-column
                                            field="feedSensorName"
                                            title="馈电设备"
                                          >
                                          </vxe-column>
                                          <vxe-column title="配置">
                                            <template #default="{ row }">
                                              <el-button
                                                @click="
                                                  pointputongConfigClick(row)
                                                "
                                                link
                                                type="primary"
                                              >
                                                配置
                                              </el-button>
                                            </template>
                                          </vxe-column>
                                        </vxe-table>
                                      </div>
                                    </el-collapse-item>
                                  </el-collapse>
                                </el-col>
                              </el-row>
                            </el-tab-pane>
                          </el-tabs>
                        </div>
                      </div>
                      <!-- 配置弹框 -->
                      <!-- <teleport to="body"> -->
                        <vxe-modal
                          esc-closable
                          destroy-on-close
                          :lock-view="false"
                          :width="500"
                          :height="500"
                          v-model="addModalconfig"
                          resize
                          :mask="true"
                        >
                          <template #title>
                            <div class="w100 h100 fsc mask_title">
                              配置开出口
                            </div>
                          </template>
                          <template #default>
                            <div class="form_box">
                              <el-form
                                ref="formRefconfig"
                                :model="formDataconfig"
                                :rules="rulesconfig"
                                label-position="top"
                              >
                                <el-row :gutter="20">
                                  <el-col :span="12">
                                    <el-form-item
                                      label="开出口编号"
                                      prop="controlPort"
                                    >
                                      <el-select
                                        disabled
                                        clearable
                                        filterable
                                        v-model="formDataconfig.controlPort"
                                        placeholder="请选择"
                                      >
                                        <el-option
                                          v-for="item in stationmodelList"
                                          :key="item.id"
                                          :label="item.stationModelName"
                                          :value="item.id"
                                        >
                                        </el-option>
                                      </el-select>
                                    </el-form-item>
                                  </el-col>
                                  <el-col :span="12">
                                    <el-form-item
                                      label="控制设备"
                                      prop="controlPortType"
                                    >
                                      <el-select
                                        class="w100"
                                        clearable
                                        filterable
                                        v-model="formDataconfig.controlPortType"
                                        placeholder="请选择"
                                        @change="controlPortTypeChange"
                                      >
                                        <el-option
                                          v-for="item in controlPortTypeList"
                                          :key="item.code"
                                          :label="item.name"
                                          :value="item.code"
                                        >
                                        </el-option>
                                      </el-select>
                                    </el-form-item>
                                  </el-col>
                                  <el-col :span="24">
                                    <el-form-item
                                      label="安装地点"
                                      prop="pointPlaceName"
                                    >
                                      <el-select
                                        class="w100"
                                        clearable
                                        filterable
                                        allow-create
                                        v-model="formDataconfig.pointPlaceName"
                                        placeholder="请选择"
                                      >
                                        <el-option
                                          v-for="item in addressInfoList"
                                          :key="item.id"
                                          :label="item.placeName"
                                          :value="item.placeName"
                                        >
                                        </el-option>
                                      </el-select>
                                    </el-form-item>
                                  </el-col>
                                  <el-col
                                    :span="24"
                                    v-if="formDataconfig.controlPortType == 1"
                                  >
                                    <el-form-item
                                      label="馈电测点"
                                      prop="feedPointId"
                                    >
                                      <el-select
                                        class="w100"
                                        clearable
                                        filterable
                                        allow-create
                                        v-model="formDataconfig.feedPointId"
                                        placeholder="请选择"
                                        @change="feedPointIdChange"
                                      >
                                        <el-option
                                          v-for="item in feedPointIdList"
                                          :key="item.pointId"
                                          :label="
                                            item.pointId +
                                            '/' +
                                            item.sensorName +
                                            '/' +
                                            item.pointPlaceName
                                          "
                                          :value="item.pointId"
                                        >
                                        </el-option>
                                      </el-select>
                                    </el-form-item>
                                  </el-col>
                                  <el-col :span="24">
                                    <el-form-item label="地理位置">
                                      <div class="fbc">
                                        <el-input
                                          v-model="formDataconfig.locationX"
                                          oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                        >
                                          <template #prefix>
                                            <span>X</span>
                                          </template>
                                        </el-input>
                                        <el-input
                                          v-model="formDataconfig.locationY"
                                          oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                        >
                                          <template #prefix>
                                            <span>Y</span>
                                          </template>
                                        </el-input>
                                        <el-input
                                          v-model="formDataconfig.locationZ"
                                          oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                        >
                                          <template #prefix>
                                            <span>Z</span>
                                          </template>
                                        </el-input>
                                      </div>
                                    </el-form-item>
                                  </el-col>
                                  <el-col :span="24">
                                    <el-form-item>
                                      <div class="fec w100">
                                        <el-button
                                          type="primary"
                                          @click="onSubmitConfigClick"
                                        >
                                          确定
                                        </el-button>
                                        <el-button @click="cancelConfigClick">
                                          取消
                                        </el-button>
                                      </div>
                                    </el-form-item>
                                  </el-col>
                                </el-row>
                              </el-form>
                            </div>
                          </template>
                        </vxe-modal>
                      <!-- </teleport> -->
                      <div v-if="activeNamePoint == 4">
                        <el-row :gutter="20" v-if="item.obj">
                          <el-col
                            :span="8"
                            v-if="item.obj.cutArea && item.obj.cutArea != null"
                          >
                            <el-form-item
                              label="断电区域"
                              :prop="`multiplePointBranchList[${index}][obj]cutArea[areaIdList]`"
                              :rules="rules1.field_mulcutAreaareaIdList"
                            >
                              <el-select
                                class="w100"
                                clearable
                                filterable
                                multiple
                                v-model="item.obj.cutArea.areaIdList"
                                placeholder="请选择"
                              >
                                <el-option
                                  v-for="item in infosearchAllList"
                                  :key="item.id"
                                  :label="item.areaName"
                                  :value="item.id"
                                >
                                </el-option>
                              </el-select>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8">
                            <el-form-item
                              label="断电值≥"
                              :prop="`multiplePointBranchList[${index}][obj]cutArea[cutValue]`"
                              :rules="rules1.field_mulcutAreacutValue"
                            >
                              <el-input
                                oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                v-model="item.obj.cutArea.cutValue"
                                placeholder="请输入"
                              >
                              </el-input>
                            </el-form-item>
                          </el-col>
                          <el-col :span="8">
                            <el-form-item
                              label="复电值＜"
                              :prop="`multiplePointBranchList[${index}][obj]cutArea[resumeValue]`"
                              :rules="rules1.field_mulcutArearesumeValue"
                            >
                              <el-input
                                oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                v-model="item.obj.cutArea.resumeValue"
                                placeholder="请输入"
                              >
                              </el-input>
                            </el-form-item>
                          </el-col>
                        </el-row>
                      </div>
                    </el-col>
                  </el-row>
                </el-tab-pane>
              </el-tabs>
              </div>
              <!-- 普通测点 -->
              <div v-if="form_add2.pointType == 1 || form_add2.pointType == 3">
                                <el-row :gutter="20">
                                    <el-col :span="24" v-if="baohanD!='S'">
                                        <p class="activeNameTab" style="padding-left:10px;">
                                            <span v-for="item in pointactiveNameList" :key="item.type"
                                                @click="ponitactiveNameTabClick(item.type)">
                                                <span v-if="baohanD=='D'">
                                                    <span v-if="form_add2.needGrandalarm">
                                                        <span class="span"
                                                            :class="activeNamePoint ==item.type ? 'active':''"
                                                            v-if="item.type!=4">{{ item.name }}</span>
                                                    </span>
                                                    <span v-else>
                                                        <span class="span"
                                                            :class="activeNamePoint ==item.type ? 'active':''"
                                                            v-if="item.type!=4 && item.type!=2">{{ item.name }}</span>
                                                    </span>
                                                </span>
                                                <span v-else>
                                                    <span v-if="form_add2.needGrandalarm">
                                                        <span class="span"
                                                            :class="activeNamePoint ==item.type ? 'active':''">{{ item.name }}</span>
                                                    </span>
                                                    <span v-else>
                                                        <span class="span"
                                                            :class="activeNamePoint ==item.type ? 'active':''"
                                                            v-if="item.type!=2">{{ item.name }}</span>
                                                    </span>
                                                </span>
                                            </span>
                                        </p>
                                    </el-col>
                                    <el-col :span="24" v-if="baohanD!='S'">
                                        <div class="desc_box" v-if="activeNamePoint == 1">
                                            <el-row :gutter="20">
                                                <el-col :span="6">
                                                    <el-form-item label="报警模式" prop="alarmBasic.alarmType">
                                                        <el-select class="w100" clearable filterable
                                                            v-model="form_add2.alarmBasic.alarmType"
                                                            placeholder="请选择">
                                                            <el-option v-for="item in alarmBasicList"
                                                                :key="item.code" :label="item.name+'报警'"
                                                                :value="item.code">
                                                            </el-option>
                                                        </el-select>
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="16">
                                                    <el-form-item label="上限报警值" prop="alarmBasic.alarmType1"
                                                        v-if="(form_add2.alarmBasic.alarmType ==1 || form_add2.alarmBasic.alarmType ==3)&&baohanD!='D'">
                                                        <div class="fbc">
                                                            <el-row :gutter="20">
                                                                <el-col :span="12">
                                                                    <div class="fac">
                                                                        <span class="wn">报警值≥ </span>
                                                                        <el-input oninput="value =value.replace(/[^\-\d.]/g, '').replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1').replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1').replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1').replace(/(\.\d{8})\d*/, '$1')"
                                                                            v-model="form_add2.alarmBasic.upAlarmValue"
                                                                            placeholder="报警值≥">
                                                                        </el-input>
                                                                    </div>
                                                                </el-col>
                                                                <el-col :span="12">
                                                                    <div class="fac">
                                                                        <span class="wn">解报值＜ </span>
                                                                        <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                            v-model="form_add2.alarmBasic.upRelieveValue"
                                                                            placeholder="解报值＜">
                                                                        </el-input>
                                                                    </div>
                                                                </el-col>
                                                            </el-row>
                                                        </div>
                                                    </el-form-item>
                                                    <el-form-item label="下限报警值" prop="alarmBasic.alarmType2"
                                                        v-if="(form_add2.alarmBasic.alarmType ==2 || form_add2.alarmBasic.alarmType ==3)&&baohanD!='D'">
                                                        <div class="fbc">
                                                            <el-row :gutter="20">
                                                                <el-col :span="12">
                                                                    <div class="fac">
                                                                        <span class="wn">报警值≤</span>
                                                                        <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                            v-model="form_add2.alarmBasic.downAlarmValue"
                                                                            placeholder="报警值≤">
                                                                        </el-input>
                                                                    </div>
                                                                </el-col>
                                                                <el-col :span="12">
                                                                    <div class="fac">
                                                                        <span class="wn">解报值＞</span>
                                                                        <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                            v-model="form_add2.alarmBasic.downRelieveValue"
                                                                            placeholder="解报值＞">
                                                                        </el-input>
                                                                    </div>
                                                                </el-col>
                                                            </el-row>
                                                        </div>
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="8">
                                                    <el-form-item label="" prop="hasPreAlarm" label-position="left">
                                                        <span>预报警</span>
                                                        <el-switch style="margin:0 5px;"
                                                            v-model="form_add2.prealarmBasic.hasPreAlarm">
                                                        </el-switch>
                                                        <el-button link type="primary" size="small"
                                                            @click="hasPreAlarmdescClick">
                                                            全部详情
                                                        </el-button>
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="16"></el-col>
                                                <el-col :span="6"
                                                    v-if="baohanD!='D' && form_add2.prealarmBasic.hasPreAlarm">
                                                    <el-form-item label="上限预报值" prop="prealarmBasic.upPrealarmValue">
                                                        <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                            v-model="form_add2.prealarmBasic.upPrealarmValue"
                                                            placeholder="请输入">
                                                        </el-input>
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="6"
                                                    v-if="baohanD!='D'&&form_add2.prealarmBasic.hasPreAlarm">
                                                    <el-form-item label="下限预报值" prop="prealarmBasic.downPrealarmValue">
                                                        <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                            v-model="form_add2.prealarmBasic.downPrealarmValue"
                                                            placeholder="请输入"
                                                            :disabled="!form_add2.prealarmBasic.hasPreAlarm">
                                                        </el-input>
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="12"
                                                    v-if="baohanD=='D'&&form_add2.prealarmBasic.hasPreAlarm">
                                                    <el-row :gutter="20">
                                                        <el-col :span="12" style="margin-top:16px;">
                                                            <el-radio-group
                                                                v-model="form_add2.alarmBasic.alarmType"
                                                                class="fbc">
                                                                <el-radio v-show="item.code!=0" :value="item.code"
                                                                    :label="item.name+'报警'"
                                                                    v-for="item in alarmBasicList"></el-radio>
                                                            </el-radio-group>
                                                        </el-col>
                                                    </el-row>
                                                </el-col>
                                                <el-col :span="6" v-if="form_add2.prealarmBasic.hasPreAlarm">
                                                    <el-form-item label="超时" prop="prealarmTimeout">
                                                        <span class="fac">
                                                            <el-select clearable filterable
                                                                v-model="form_add2.prealarmBasic.prealarmTimeout"
                                                                placeholder="请选择">
                                                                <el-option v-for="item in prealarmTimeoutData"
                                                                    :key="item" :label="item+'分钟'" :value="item">
                                                                </el-option>
                                                            </el-select>
                                                            <span class="wn">分钟</span>
                                                        </span>
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="24" v-if="baohanD!='D'">
                                                    <el-form-item label="" prop="hasConstantPreAlarm">
                                                        <span>恒值预报警</span>
                                                        <el-switch style="margin:0 5px;"
                                                            v-model="form_add2.prealarmBasic.hasConstantPreAlarm">
                                                        </el-switch>
                                                        <el-button link type="primary" size="small"
                                                            @click="hasConstantPreAlarmdescClick">
                                                            全部详情
                                                        </el-button>
                                                    </el-form-item>
                                                </el-col>

                                                <el-col :span="8"
                                                    v-if="baohanD!='D' && form_add2.prealarmBasic.hasConstantPreAlarm">
                                                    <el-form-item label="恒值持续时间" prop="prealarmBasic.constantTime">
                                                        <span class="fac">
                                                            <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                v-model="form_add2.prealarmBasic.constantTime"
                                                                placeholder="请输入">
                                                            </el-input>
                                                            <span class="wn">分钟</span>
                                                        </span>
                                                    </el-form-item>
                                                </el-col>
                                            </el-row>
                                        </div>
                                        <!-- 预报警全部详情弹框 -->
                                        <!-- <teleport> -->
                                            <vxe-modal esc-closable destroy-on-close :lock-view="false" :width="1000"
                                                :height="500" v-model="addModalhasPreAlarm" resize :mask="true">
                                                <template #title>
                                                    <div class="w100 h100 fsc mask_title">预报警全部详情</div>
                                                </template>
                                                <template #default>
                                                    <el-row :gutter="20" style="margin:10px 0">
                                                        <el-col :span="8">
                                                            <span class="wn marr5">设备名称</span>
                                                            <el-tree-select clearable
                                                                v-model="hasPreAlarmData.condition"
                                                                :data="hasPreAlarmData.selList" placeholder="请选择"
                                                                highlight-current
                                                                :props="{  children: 'children',value: 'code', label: 'name'}"
                                                                check-strictly @change="chuangantreeChange1" />
                                                        </el-col>
                                                        <el-col :span="8">
                                                            <el-button class="marl20" type="primary"
                                                                @click="yinyonClick">查询
                                                            </el-button>
                                                            <el-button type="info" @click="cancelyinyonClick">重置
                                                            </el-button>
                                                        </el-col>
                                                    </el-row>
                                                    <vxe-table height="400" :data="hasPreAlarmData.tabledata"
                                                        border="inner">
                                                        <vxe-column
                                                            v-for="(item,index) in hasPreAlarmData.tableheads"
                                                            :field="item.field" :title="item.title"
                                                            :params="{name:item.name}" :width="item.width?item.width:''"
                                                            :key="index">
                                                        </vxe-column>
                                                        <vxe-column title="操作">
                                                            <template #default="{row}">
                                                                <el-button link type="primary"
                                                                    @click="yubaojingConfigClick(row)">配置</el-button>
                                                            </template>
                                                        </vxe-column>
                                                    </vxe-table>
                                                    <vxe-pager v-if="hasPreAlarmData.total>0"
                                                        @page-change="hasPreAlarmpagechange" :background="false"
                                                        class="allbk" align="right"
                                                        :layouts="['PrevJump', 'PrevPage', 'JumpNumber', 'NextPage', 'NextJump', 'Sizes', 'FullJump', 'Total']"
                                                        v-model:current-page="hasPreAlarmData.query.pageNum"
                                                        v-model:page-size="hasPreAlarmData.query.pageSize"
                                                        :total="hasPreAlarmData.total">
                                                    </vxe-pager>
                                                </template>
                                            </vxe-modal>
                                        <!-- </teleport> -->
                                        <!-- 恒值预报警全部详情弹框 -->
                                        <!-- <teleport to="body"> -->
                                            <vxe-modal esc-closable destroy-on-close :lock-view="false" :width="1000"
                                                :height="500" v-model="addModalhasConstantPreAlarm" resize
                                                :mask="true">
                                                <template #title>
                                                    <div class="w100 h100 fsc mask_title">恒值预报警全部详情</div>
                                                </template>
                                                <template #default>
                                                    <el-row :gutter="20" style="margin:10px 0">
                                                        <el-col :span="8">
                                                            <span class="wn marr5">设备名称</span>
                                                            <el-tree-select clearable
                                                                v-model="hasConstantPreAlarmData.condition"
                                                                :data="hasConstantPreAlarmData.selList"
                                                                placeholder="请选择" highlight-current
                                                                :props="{  children: 'children',value: 'code', label: 'name'}"
                                                                check-strictly @change="chuangantreeChange2" />
                                                        </el-col>
                                                        <el-col :span="8">
                                                            <el-button class="marl20" type="primary"
                                                                @click="yinyonClick1">
                                                                查询
                                                            </el-button>
                                                            <el-button type="info" @click="cancelyinyonClick1">重置
                                                            </el-button>
                                                        </el-col>
                                                    </el-row>
                                                    <vxe-table height="400"
                                                        :data="hasConstantPreAlarmData.tabledata" border="inner">
                                                        <vxe-column
                                                            v-for="(item,index) in hasConstantPreAlarmData.tableheads"
                                                            :field="item.field" :title="item.title"
                                                            :params="{name:item.name}" :width="item.width?item.width:''"
                                                            :key="index">
                                                        </vxe-column>
                                                        <vxe-column title="操作">
                                                            <template #default="{row}">
                                                                <el-button link type="primary"
                                                                    @click="hengbaojingConfigClick(row)">配置</el-button>
                                                            </template>
                                                        </vxe-column>
                                                    </vxe-table>
                                                    <vxe-pager v-if="hasConstantPreAlarmData.total>0"
                                                        @page-change="hasConstantPreAlarmpagechange" :background="false"
                                                        class="allbk" align="right"
                                                        :layouts="['PrevJump', 'PrevPage', 'JumpNumber', 'NextPage', 'NextJump', 'Sizes', 'FullJump', 'Total']"
                                                        v-model:current-page="hasConstantPreAlarmData.query.pageNum"
                                                        v-model:page-size="hasConstantPreAlarmData.query.pageSize"
                                                        :total="hasConstantPreAlarmData.total">
                                                    </vxe-pager>
                                                </template>
                                            </vxe-modal>
                                        <!-- </teleport> -->
                                        <!-- 分级配置 -->
                                        <div class="desc_box" v-if="activeNamePoint == 2">
                                            <el-row :gutter="20">
                                                <el-col :span="6">
                                                    <el-form-item :label="baohanD == 'D'?'分级报警':'上限分级报警'"
                                                        prop="hasUpGrandAlarm">
                                                        <el-switch v-model="form_add2.hasUpGrandAlarm"
                                                            @change="hasUpGrandAlarmChange" />
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="6" v-if="baohanD != 'D'">
                                                    <el-form-item label="下限分级报警" prop="hasDownGrandAlarm">
                                                        <el-switch v-model="form_add2.hasDownGrandAlarm"
                                                            @change="hasDownGrandAlarmChange" />
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="6">
                                                    <el-form-item label="启用多级报警" prop="hasMoreGrandAlarm">
                                                        <el-switch v-model="form_add2.hasMoreGrandAlarm" />
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="6" v-if="baohanD != 'D'">
                                                    <el-form-item label="启用涨/跌幅" prop="hasChangeGrandAlarm">
                                                        <el-switch v-model="form_add2.hasChangeGrandAlarm" />
                                                    </el-form-item>
                                                </el-col>
                                            </el-row>
                                            <el-row
                                                v-if="form_add2.hasUpGrandAlarm && form_add2.hasDownGrandAlarm">
                                                <el-radio-group v-model="radio1">
                                                    <el-radio-button label="上限分级报警" value="上限分级报警" />
                                                    <el-radio-button label="下限分级报警" value="下限分级报警" />
                                                </el-radio-group>
                                            </el-row>
                                            <el-row :gutter="20" style="margin:0 10px"
                                                v-if="radio1=='上限分级报警' && form_add2.hasUpGrandAlarm">
                                                <el-row :gutter="20" v-if="baohanD != 'D'">
                                                    <el-col :span="24" v-if="form_add2.hasChangeGrandAlarm">
                                                        <p class="drawer_sub_title"
                                                            style="margin-left:0;padding-top:10px;">
                                                            <span>
                                                                变化参数设置</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                                                        <el-form-item label="变化率判断门限≥"
                                                            prop="upGrandalarmBasic.grandalarmRate.thresholdValue">
                                                            <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                v-model="form_add2.upGrandalarmBasic.grandalarmRate.thresholdValue"
                                                                placeholder="请输入">
                                                                <template #append>{{baohanunit}}</template>
                                                            </el-input>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                                                        <el-form-item label="变化率持续周期"
                                                            prop="upGrandalarmBasic.grandalarmRate.rateCycle">
                                                            <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                v-model="form_add2.upGrandalarmBasic.grandalarmRate.rateCycle"
                                                                placeholder="请输入">
                                                                <template #append>秒</template>
                                                            </el-input>
                                                        </el-form-item>
                                                    </el-col>
                                                </el-row>
                                                <el-row :gutter="20">
                                                    <el-col :span="24"
                                                        v-if="baohanD == 'D' && form_add2.hasMoreGrandAlarm">
                                                        <el-row :gutter="20">
                                                            <el-col :span="24">
                                                                <p class="pfz">六级报警</p>
                                                            </el-col>
                                                            <el-col :span="8">
                                                                <el-form-item label=""
                                                                    prop="upGrandalarmBasic.grandsixTime">
                                                                    <div class="fac">
                                                                        <span class="wn"
                                                                            v-html="baohanD == 'D'?'持续时间≤':'或 持续时间≤'"></span>
                                                                        <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                            v-model="form_add2.upGrandalarmBasic.grandsixTime"
                                                                            placeholder="请输入">
                                                                            <template #append>分钟</template>
                                                                        </el-input>
                                                                    </div>
                                                                </el-form-item>
                                                            </el-col>
                                                            <el-col :span="24">
                                                                <p class="pfz">五级报警</p>
                                                            </el-col>
                                                            <el-col :span="8">
                                                                <el-form-item label=""
                                                                    prop="upGrandalarmBasic.grandfiveTime">
                                                                    <div class="fac">
                                                                        <span class="wn"
                                                                            v-html="baohanD == 'D'?'持续时间≤':'或 持续时间≤'"></span>
                                                                        <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                            v-model="form_add2.upGrandalarmBasic.grandfiveTime"
                                                                            placeholder="请输入">
                                                                            <template #append>分钟</template>
                                                                        </el-input>
                                                                    </div>
                                                                </el-form-item>
                                                            </el-col>
                                                        </el-row>
                                                    </el-col>
                                                    <el-col :span="24">
                                                        <p class="pfz">四级报警</p>
                                                    </el-col>
                                                    <el-col :span="8" v-if="baohanD != 'D'">
                                                        <el-form-item label="" prop="upGrandalarmBasic.grandfourValue">
                                                            <div class="fac">
                                                                <span class="wn">上限预报值≥</span>
                                                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                    v-model="form_add2.upGrandalarmBasic.grandfourValue"
                                                                    placeholder="请输入">
                                                                    <template #append>{{baohanunit}}</template>
                                                                </el-input>
                                                            </div>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="" prop="upGrandalarmBasic.grandfourTime">
                                                            <div class="fac">
                                                                <span class="wn"
                                                                    v-html="baohanD == 'D'?'持续时间≤':'或 持续时间≤'"></span>
                                                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                    v-model="form_add2.upGrandalarmBasic.grandfourTime"
                                                                    placeholder="请输入">
                                                                    <template #append>分钟</template>
                                                                </el-input>
                                                            </div>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                                                        <el-form-item label=""
                                                            prop="upGrandalarmBasic.grandalarmRate.rateFourValue">
                                                            <div class="fac">
                                                                <span class="wn">或 涨幅≥</span>
                                                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                    v-model="form_add2.upGrandalarmBasic.grandalarmRate.rateFourValue"
                                                                    placeholder="请输入">
                                                                    <template #append>{{baohanunit}}</template>
                                                                </el-input>
                                                            </div>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="24">
                                                        <p class="pfz">三级报警</p>
                                                    </el-col>
                                                    <el-col :span="8" v-if="baohanD != 'D'">
                                                        <el-form-item label="" prop="upGrandalarmBasic.grandthreeValue">
                                                            <div class="fac">
                                                                <span class="wn">上限预报值≥</span>
                                                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                    v-model="form_add2.upGrandalarmBasic.grandthreeValue"
                                                                    placeholder="请输入">
                                                                    <template #append>{{baohanunit}}</template>
                                                                </el-input>
                                                            </div>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="" prop="upGrandalarmBasic.grandthreeTime">
                                                            <div class="fac">
                                                                <span class="wn"
                                                                    v-html="baohanD == 'D'?'持续时间≤':'或 持续时间≤'"></span>
                                                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                    v-model="form_add2.upGrandalarmBasic.grandthreeTime"
                                                                    placeholder="请输入">
                                                                    <template #append>分钟</template>
                                                                </el-input>
                                                            </div>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                                                        <el-form-item label=""
                                                            prop="upGrandalarmBasic.grandalarmRate.rateThreeValue">
                                                            <div class="fac">
                                                                <span class="wn">或 涨幅≥</span>
                                                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                    v-model="form_add2.upGrandalarmBasic.grandalarmRate.rateThreeValue"
                                                                    placeholder="请输入">
                                                                    <template #append>{{baohanunit}}</template>
                                                                </el-input>
                                                            </div>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="24">
                                                        <p class="pfz">二级报警</p>
                                                    </el-col>
                                                    <el-col :span="8" v-if="baohanD != 'D'">
                                                        <el-form-item label="" prop="upGrandalarmBasic.grandtwoValue">
                                                            <div class="fac">
                                                                <span class="wn">上限预报值≥</span>
                                                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                    v-model="form_add2.upGrandalarmBasic.grandtwoValue"
                                                                    placeholder="请输入">
                                                                    <template #append>{{baohanunit}}</template>
                                                                </el-input>
                                                            </div>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item prop="upGrandalarmBasic.grandtwoTime">
                                                            <div class="fac">
                                                                <span class="wn"
                                                                    v-html="baohanD == 'D'?'持续时间≤':'或 持续时间≤'"></span>
                                                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                    v-model="form_add2.upGrandalarmBasic.grandtwoTime"
                                                                    placeholder="请输入">
                                                                    <template #append>分钟</template>
                                                                </el-input>
                                                            </div>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                                                        <el-form-item
                                                            prop="upGrandalarmBasic.grandalarmRate.rateTwoValue">
                                                            <div class="fac">
                                                                <span class="wn">或 涨幅≥</span>
                                                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                    v-model="form_add2.upGrandalarmBasic.grandalarmRate.rateTwoValue"
                                                                    placeholder="请输入">
                                                                    <template #append>{{baohanunit}}</template>
                                                                </el-input>
                                                            </div>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="24">
                                                        <p class="pfz">一级报警</p>
                                                    </el-col>
                                                    <el-col :span="8" v-if="baohanD != 'D'">
                                                        <el-form-item label="" prop="upGrandalarmBasic.grandoneValue">
                                                            <div class="fac">
                                                                <span class="wn">上限预报值≥</span>
                                                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                    v-model="form_add2.upGrandalarmBasic.grandoneValue"
                                                                    placeholder="请输入">
                                                                    <template #append>{{baohanunit}}</template>
                                                                </el-input>
                                                            </div>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item prop="upGrandalarmBasic.grandoneTime">
                                                            <div class="fac">
                                                                <span class="wn"
                                                                    v-html="baohanD == 'D'?'持续时间≤':'或 持续时间≤'"></span>
                                                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                    v-model="form_add2.upGrandalarmBasic.grandoneTime"
                                                                    placeholder="请输入">
                                                                    <template #append>分钟</template>
                                                                </el-input>
                                                            </div>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                                                        <el-form-item
                                                            prop="upGrandalarmBasic.grandalarmRate.rateOneValue">
                                                            <div class="fac">
                                                                <span class="wn">或 涨幅≥</span>
                                                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                    v-model="form_add2.upGrandalarmBasic.grandalarmRate.rateOneValue"
                                                                    placeholder="请输入">
                                                                    <template #append>{{baohanunit}}</template>
                                                                </el-input>
                                                            </div>
                                                        </el-form-item>
                                                    </el-col>
                                                </el-row>
                                            </el-row>
                                            <el-row :gutter="20" style="margin:0 10px"
                                                v-if="radio1=='下限分级报警' && form_add2.hasDownGrandAlarm">
                                                <el-row :gutter="20">
                                                    <el-col :span="24" v-if="form_add2.hasChangeGrandAlarm">
                                                        <p class="drawer_sub_title"
                                                            style="margin-left:0;padding-top:10px;">
                                                            <span>
                                                                变化参数设置</span>
                                                        </p>
                                                    </el-col>
                                                    <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                                                        <el-form-item label="变化率判断门限≤"
                                                            prop="downGrandalarmBasic.grandalarmRate.thresholdValue">
                                                            <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                v-model="form_add2.downGrandalarmBasic.grandalarmRate.thresholdValue"
                                                                placeholder="请输入">
                                                                <template #append>{{baohanunit}}</template>
                                                            </el-input>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                                                        <el-form-item label="变化率持续周期"
                                                            prop="downGrandalarmBasic.grandalarmRate.rateCycle">
                                                            <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                v-model="form_add2.downGrandalarmBasic.grandalarmRate.rateCycle"
                                                                placeholder="请输入">
                                                                <template #append>秒</template>
                                                            </el-input>
                                                        </el-form-item>
                                                    </el-col>
                                                </el-row>
                                                <el-row :gutter="20" v-if="form_add2.hasMoreGrandAlarm">
                                                    <el-col :span="24">
                                                        <p class="pfz">六级报警</p>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="" prop="downGrandalarmBasic.grandsixValue">
                                                            <div class="fac">
                                                                <span class="wn">下限预报值≤</span>
                                                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                    v-model="form_add2.downGrandalarmBasic.grandsixValue"
                                                                    placeholder="请输入">
                                                                    <template #append>{{baohanunit}}</template>
                                                                </el-input>
                                                            </div>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="" prop="downGrandalarmBasic.grandsixTime">
                                                            <div class="fac">
                                                                <span class="wn">或 持续时间≤</span>
                                                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                    v-model="form_add2.downGrandalarmBasic.grandsixTime"
                                                                    placeholder="请输入">
                                                                    <template #append>分钟</template>
                                                                </el-input>
                                                            </div>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                                                        <el-form-item label=""
                                                            prop="downGrandalarmBasic.grandalarmRate.rateSixValue">
                                                            <div class="fac">
                                                                <span class="wn">或 跌幅≥</span>
                                                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                    v-model="form_add2.downGrandalarmBasic.grandalarmRate.rateSixValue"
                                                                    placeholder="请输入">
                                                                    <template #append>{{baohanunit}}</template>
                                                                </el-input>
                                                            </div>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="24">
                                                        <p class="pfz">五级报警</p>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="" prop="downGrandalarmBasic.grandfiveValue"
                                                            v-if="form_add2.hasMoreGrandAlarm">
                                                            <div class="fac">
                                                                <span class="wn">下限预报值≤</span>
                                                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                    v-model="form_add2.downGrandalarmBasic.grandfiveValue"
                                                                    placeholder="请输入">
                                                                    <template #append>{{baohanunit}}</template>
                                                                </el-input>
                                                            </div>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8">
                                                        <el-form-item label="" prop="downGrandalarmBasic.grandfiveTime">
                                                            <div class="fac">
                                                                <span class="wn">或 持续时间≤</span>
                                                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                    v-model="form_add2.downGrandalarmBasic.grandfiveTime"
                                                                    placeholder="请输入">
                                                                    <template #append>分钟</template>
                                                                </el-input>
                                                            </div>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                                                        <el-form-item label=""
                                                            prop="downGrandalarmBasic.grandalarmRate.rateFiveValue">
                                                            <div class="fac">
                                                                <span class="wn">或 跌幅≥</span>
                                                                <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                    v-model="form_add2.downGrandalarmBasic.grandalarmRate.rateFiveValue"
                                                                    placeholder="请输入">
                                                                    <template #append>{{baohanunit}}</template>
                                                                </el-input>
                                                            </div>
                                                        </el-form-item>
                                                    </el-col>
                                                </el-row>
                                                <el-col :span="24">
                                                    <p class="pfz">四级报警</p>
                                                </el-col>
                                                <el-col :span="8">
                                                    <el-form-item label="" prop="downGrandalarmBasic.grandfourValue">
                                                        <div class="fac">
                                                            <span class="wn">下限预报值≤</span>
                                                            <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                v-model="form_add2.downGrandalarmBasic.grandfourValue"
                                                                placeholder="请输入">
                                                                <template #append>{{baohanunit}}</template>
                                                            </el-input>
                                                        </div>
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="8">
                                                    <el-form-item label="" prop="downGrandalarmBasic.grandfourTime">
                                                        <div class="fac">
                                                            <span class="wn">或 持续时间≤</span>
                                                            <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                v-model="form_add2.downGrandalarmBasic.grandfourTime"
                                                                placeholder="请输入">
                                                                <template #append>分钟</template>
                                                            </el-input>
                                                        </div>
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                                                    <el-form-item label=""
                                                        prop="downGrandalarmBasic.grandalarmRate.rateFourValue">
                                                        <div class="fac">
                                                            <span class="wn">或 跌幅≥</span>
                                                            <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                v-model="form_add2.downGrandalarmBasic.grandalarmRate.rateFourValue"
                                                                placeholder="请输入">
                                                                <template #append>{{baohanunit}}</template>
                                                            </el-input>
                                                        </div>
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="24">
                                                    <p class="pfz">三级报警</p>
                                                </el-col>
                                                <el-col :span="8">
                                                    <el-form-item label="" prop="downGrandalarmBasic.grandthreeValue">
                                                        <div class="fac">
                                                            <span class="wn">下限预报值≤</span>
                                                            <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                v-model="form_add2.downGrandalarmBasic.grandthreeValue"
                                                                placeholder="请输入">
                                                                <template #append>{{baohanunit}}</template>
                                                            </el-input>
                                                        </div>
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="8">
                                                    <el-form-item label="" prop="downGrandalarmBasic.grandthreeTime">
                                                        <div class="fac">
                                                            <span class="wn">或 持续时间≤</span>
                                                            <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                v-model="form_add2.downGrandalarmBasic.grandthreeTime"
                                                                placeholder="请输入">
                                                                <template #append>分钟</template>
                                                            </el-input>
                                                        </div>
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                                                    <el-form-item label=""
                                                        prop="downGrandalarmBasic.grandalarmRate.rateThreeValue">
                                                        <div class="fac">
                                                            <span class="wn">或 跌幅≥</span>
                                                            <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                v-model="form_add2.downGrandalarmBasic.grandalarmRate.rateThreeValue"
                                                                placeholder="请输入">
                                                                <template #append>{{baohanunit}}</template>
                                                            </el-input>
                                                        </div>
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="24">
                                                    <p class="pfz">二级报警</p>
                                                </el-col>
                                                <el-col :span="8">
                                                    <el-form-item label="" prop="downGrandalarmBasic.grandtwoValue">
                                                        <div class="fac">
                                                            <span class="wn">下限预报值≤</span>
                                                            <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                v-model="form_add2.downGrandalarmBasic.grandtwoValue"
                                                                placeholder="请输入">
                                                                <template #append>{{baohanunit}}</template>
                                                            </el-input>
                                                        </div>
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="8">
                                                    <el-form-item label="" prop="downGrandalarmBasic.grandtwoTime">
                                                        <div class="fac">
                                                            <span class="wn">或 持续时间≤</span>
                                                            <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                v-model="form_add2.downGrandalarmBasic.grandtwoTime"
                                                                placeholder="请输入">
                                                                <template #append>分钟</template>
                                                            </el-input>
                                                        </div>
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                                                    <el-form-item label=""
                                                        prop="downGrandalarmBasic.grandalarmRate.rateTwoValue">
                                                        <div class="fac">
                                                            <span class="wn">或 跌幅≥</span>
                                                            <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                v-model="form_add2.downGrandalarmBasic.grandalarmRate.rateTwoValue"
                                                                placeholder="请输入">
                                                                <template #append>{{baohanunit}}</template>
                                                            </el-input>
                                                        </div>
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="24">
                                                    <p class="pfz">一级报警</p>
                                                </el-col>
                                                <el-col :span="8">
                                                    <el-form-item label="" prop="downGrandalarmBasic.grandoneValue">
                                                        <div class="fac">
                                                            <span class="wn">下限预报值≤</span>
                                                            <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                v-model="form_add2.downGrandalarmBasic.grandoneValue"
                                                                placeholder="请输入">
                                                                <template #append>{{baohanunit}}</template>
                                                            </el-input>
                                                        </div>
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="8">
                                                    <el-form-item label="" prop="downGrandalarmBasic.grandoneTime">
                                                        <div class="fac">
                                                            <span class="wn">或 持续时间></span>
                                                            <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                v-model="form_add2.downGrandalarmBasic.grandoneTime"
                                                                placeholder="请输入">
                                                                <template #append>分钟</template>
                                                            </el-input>
                                                        </div>
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="8" v-if="form_add2.hasChangeGrandAlarm">
                                                    <el-form-item label=""
                                                        prop="downGrandalarmBasic.grandalarmRate.rateOneValue">
                                                        <div class="fac">
                                                            <span class="wn">或 跌幅≥</span>
                                                            <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                                v-model="form_add2.downGrandalarmBasic.grandalarmRate.rateOneValue"
                                                                placeholder="请输入">
                                                                <template #append>{{baohanunit}}</template>
                                                            </el-input>
                                                        </div>
                                                    </el-form-item>
                                                </el-col>
                                            </el-row>
                                        </div>
                                        <!-- 普通断电 -->
                                        <div class="desc_box putongClass" v-if="activeNamePoint == 3">
                                            <div style="position: relative;">
                                                <el-button
                                                    style="position: absolute;top: 10px;right:20px;z-index: 2;cursor: pointer;"
                                                    link type="primary" @click="putongAddClick">
                                                    <el-icon>
                                                        <Plus />
                                                    </el-icon>新增
                                                </el-button>
                                                <el-tabs v-model="ordintranValue" type="card" class="demo-tabs"
                                                    v-if="form_add2.cutValueList!=null"
                                                    :closable="form_add2.cutValueList.length==1?false:true"
                                                    @tab-remove="removeTab">
                                                    <el-tab-pane v-for="(item,index) in form_add2.cutValueList"
                                                        :key="(index+1)" :label="item.title+(index+1)" :name="index">
                                                        <el-row :gutter="20" style="margin-top:10px;">
                                                            <el-col :span="6">
                                                                <el-form-item label="断电模式"
                                                                    :prop="`cutValueList[${index}][cutType]`"
                                                                    :rules="rules1.field_cutType">
                                                                    <el-select clearable filterable
                                                                        v-model="item.cutType" placeholder="请选择"
                                                                        @change="cutTypeChange">
                                                                        <el-option v-for="item in cutTypeList"
                                                                            :key="item.code" :label="item.name+'断电'"
                                                                            :value="item.code">
                                                                        </el-option>
                                                                    </el-select>
                                                                </el-form-item>
                                                            </el-col>
                                                            <el-col :span="6"
                                                                v-if="item.cutType ==1&&baohanD!='D'">
                                                                <el-form-item label="断电值≥"
                                                                    :prop="`cutValueList[${index}][cutValue]`"
                                                                    :rules="rules1.field_cutValue">
                                                                    <el-input v-model="item.cutValue" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" placeholder="请输入">
                                                                    </el-input>
                                                                </el-form-item>
                                                            </el-col>
                                                            <el-col :span="6"
                                                                v-if="item.cutType ==1&&baohanD!='D'">
                                                                <el-form-item label="复电值＜"
                                                                    :prop="`cutValueList[${index}][resumeValue]`"
                                                                    :rules="rules1.field_resumeValue">
                                                                    <el-input v-model="item.resumeValue" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" placeholder="请输入">
                                                                    </el-input>
                                                                </el-form-item>
                                                            </el-col>
                                                            <el-col :span="6"
                                                                v-if="item.cutType ==2&&baohanD!='D'">
                                                                <el-form-item label="断电值≤"
                                                                    :prop="`cutValueList[${index}][cutValue]`"
                                                                    :rules="rules1.field_cutValue">
                                                                    <el-input v-model="item.cutValue" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" placeholder="请输入">
                                                                    </el-input>
                                                                </el-form-item>
                                                            </el-col>
                                                            <el-col :span="6"
                                                                v-if="item.cutType ==2&&baohanD!='D'">
                                                                <el-form-item label="复电值＞"
                                                                    :prop="`cutValueList[${index}][resumeValue]`"
                                                                    :rules="rules1.field_resumeValue">
                                                                    <el-input v-model="item.resumeValue" oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')" placeholder="请输入">
                                                                    </el-input>
                                                                </el-form-item>
                                                            </el-col>
                                                            <el-col :span="6">
                                                                <el-button link type="primary" style="margin-top:35px;"
                                                                    @click="addcutdeviceClick">
                                                                    <el-icon>
                                                                        <Plus />
                                                                    </el-icon>断电设备
                                                                </el-button>
                                                            </el-col>
                                                            <el-col :span="24" style="padding:10px;">
                                                                <el-collapse v-model="collapseAtive" accordion>
                                                                    <el-collapse-item :name="index2"
                                                                        v-for="(item2,index2) in item.cutStationList">
                                                                        <template #title>
                                                                            <div class="fbc w100" @click="stopCollapse">
                                                                                <span style="padding-top:22px;">
                                                                                    <el-form-item label=""
                                                                                        :prop="`cutValueList[${index}]cutStationList[${index2}][stationPlaceName]`"
                                                                                        :rules="rules1.field_stationPlaceName">
                                                                                        <span>分站</span>
                                                                                        <el-select clearable filterable
                                                                                            v-model="item2.stationPlaceName"
                                                                                            placeholder="请选择"
                                                                                            @change="controlPortChange($event,index2)">
                                                                                            <el-option
                                                                                                v-for="item in stationPlaceNamList"
                                                                                                :key="item.stationCode"
                                                                                                :label="item.stationCode+'/'+item.stationPlaceName"
                                                                                                :value="item.stationCode">
                                                                                            </el-option>
                                                                                        </el-select>
                                                                                        <svg-icon
                                                                                            class-name="search-icon"
                                                                                            icon-class="delkong"
                                                                                            @click.stop="fenzhankong(index2)" />
                                                                                    </el-form-item>
                                                                                </span>
                                                                            </div>
                                                                        </template>
                                                                        <div style="margin-top: 10px;">
                                                                            <vxe-table border ref="tableRef"
                                                                                :data="item2.controlPortList"
                                                                                :checkbox-config="checkboxConfig"
                                                                                @checkbox-change="selectChangeEvent">
                                                                                <vxe-column type="checkbox" width="60">
                                                                                </vxe-column>
                                                                                <vxe-column field="controlPort"
                                                                                    title="开出口号">
                                                                                </vxe-column>
                                                                                <vxe-column field="controlPortType"
                                                                                    title="控制设备">
                                                                                </vxe-column>
                                                                                <vxe-column field="pointPlaceName"
                                                                                    title="安装地点">
                                                                                </vxe-column>
                                                                                <vxe-column field="feedPointId"
                                                                                    title="馈电测点">
                                                                                </vxe-column>
                                                                                <vxe-column field="feedSensorName"
                                                                                    title="馈电设备">
                                                                                </vxe-column>
                                                                                <vxe-column title="配置">
                                                                                    <template #default="{row}">
                                                                                        <el-button
                                                                                            @click="pointputongConfigClick(row)"
                                                                                            link type="primary">配置
                                                                                        </el-button>
                                                                                    </template>
                                                                                </vxe-column>
                                                                            </vxe-table>
                                                                        </div>
                                                                    </el-collapse-item>
                                                                </el-collapse>
                                                            </el-col>
                                                        </el-row>
                                                    </el-tab-pane>
                                                </el-tabs>
                                            </div>
                                        </div>
                                        <!-- 配置弹框 -->
                                        <!-- <teleport to="body"> -->
                                            <vxe-modal esc-closable destroy-on-close :lock-view="false" :width="500"
                                                :height="500" v-model="addModalconfig" resize :mask="true">
                                                <template #title>
                                                    <div class="w100 h100 fsc mask_title">配置开出口</div>
                                                </template>
                                                <template #default>
                                                    <div class="form_box">
                                                        <el-form ref="formRefconfig" :model="formDataconfig"
                                                            :rules="rulesconfig" label-position="top">
                                                            <el-row :gutter="20">
                                                                <el-col :span="12">
                                                                    <el-form-item label="开出口编号" prop="controlPort">
                                                                        <el-select disabled clearable filterable
                                                                            v-model="formDataconfig.controlPort"
                                                                            placeholder="请选择">
                                                                            <el-option
                                                                                v-for="item in stationmodelList"
                                                                                :key="item.id"
                                                                                :label="item.stationModelName"
                                                                                :value="item.id">
                                                                            </el-option>
                                                                        </el-select>
                                                                    </el-form-item>
                                                                </el-col>
                                                                <el-col :span="12">
                                                                    <el-form-item label="控制设备" prop="controlPortType">
                                                                        <el-select class="w100" clearable filterable
                                                                            v-model="formDataconfig.controlPortType"
                                                                            placeholder="请选择"
                                                                            @change="controlPortTypeChange">
                                                                            <el-option
                                                                                v-for="item in controlPortTypeList"
                                                                                :key="item.code" :label="item.name"
                                                                                :value="item.code">
                                                                            </el-option>
                                                                        </el-select>
                                                                    </el-form-item>
                                                                </el-col>
                                                                <el-col :span="24">
                                                                    <el-form-item label="安装地点" prop="pointPlaceName">
                                                                        <el-select class="w100" clearable filterable
                                                                            allow-create
                                                                            v-model="formDataconfig.pointPlaceName"
                                                                            placeholder="请选择">
                                                                            <el-option
                                                                                v-for="item in addressInfoList"
                                                                                :key="item.id" :label="item.placeName"
                                                                                :value="item.placeName">
                                                                            </el-option>
                                                                        </el-select>
                                                                    </el-form-item>
                                                                </el-col>
                                                                <el-col :span="24">
                                                                    <el-form-item label="馈电测点" prop="feedPointId">
                                                                        <el-select class="w100" clearable filterable
                                                                            allow-create
                                                                            :disabled="formDataconfig.controlPortType==2"
                                                                            v-model="formDataconfig.feedPointId"
                                                                            placeholder="请选择"
                                                                            @change="feedPointIdChange">
                                                                            <el-option
                                                                                v-for="item in feedPointIdList"
                                                                                :key="item.pointId"
                                                                                :label="item.pointId+'/'+item.sensorName+'/'+item.pointPlaceName"
                                                                                :value="item.pointId">
                                                                            </el-option>
                                                                        </el-select>
                                                                    </el-form-item>
                                                                </el-col>
                                                                <el-col :span="24">
                                                                    <el-form-item label="地理位置">
                                                                        <div class="fbc">
                                                                            <el-input
                                                                                v-model="formDataconfig.locationX"
                                                                                oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')">
                                                                                <template #prefix>
                                                                                    <span>X</span>
                                                                                </template>
                                                                            </el-input>
                                                                            <el-input
                                                                                v-model="formDataconfig.locationY"
                                                                                oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')">
                                                                                <template #prefix>
                                                                                    <span>Y</span>
                                                                                </template>
                                                                            </el-input>
                                                                            <el-input
                                                                                v-model="formDataconfig.locationZ"
                                                                                oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')">
                                                                                <template #prefix>
                                                                                    <span>Z</span>
                                                                                </template>
                                                                            </el-input>
                                                                        </div>
                                                                    </el-form-item>
                                                                </el-col>
                                                                <el-col :span="24">
                                                                    <el-form-item>
                                                                        <div class="fec w100">
                                                                            <el-button type="primary"
                                                                                @click="onSubmitConfigClick">确定
                                                                            </el-button>
                                                                            <el-button @click="cancelConfigClick">取消
                                                                            </el-button>
                                                                        </div>
                                                                    </el-form-item>
                                                                </el-col>
                                                            </el-row>
                                                        </el-form>
                                                    </div>
                                                </template>
                                            </vxe-modal>
                                        <!-- </teleport> -->
                                        <div class="desc_box" v-if="activeNamePoint == 4">
                                            <el-row :gutter="20" v-if="form_add2.cutArea !=null">
                                                <el-col :span="8">
                                                    <el-form-item label="断电区域" prop="cutArea.areaIdList">
                                                        <el-select clearable filterable multiple
                                                            v-model="form_add2.cutArea.areaIdList"
                                                            placeholder="请选择">
                                                            <el-option v-for="item in infosearchAllList"
                                                                :key="item.id" :label="item.areaName" :value="item.id">
                                                            </el-option>
                                                        </el-select>
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="8">
                                                    <el-form-item :label="baohanD!='D'?'断电值':'断电值≥'"
                                                        prop="cutArea.cutValue">
                                                        <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                            v-model="form_add2.cutArea.cutValue"
                                                            placeholder="请输入">
                                                        </el-input>
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="8">
                                                    <el-form-item :label="baohanD!='D'?'复电值':'复电值＜'"
                                                        prop="cutArea.resumeValue">
                                                        <el-input oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
'.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
.replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
.replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                                                            v-model="form_add2.cutArea.resumeValue"
                                                            placeholder="请输入">
                                                        </el-input>
                                                    </el-form-item>
                                                </el-col>
                                            </el-row>
                                        </div>
                                    </el-col>
                                </el-row>
              </div>
            </el-form>
          </div>
        </template>
        <template #footer>
          <div class="footer_btns">
            <div></div>
            <div>
              <el-button @click="open_add2 = false">取消</el-button>
              <el-button type="primary" @click="addpointClick">确定</el-button>
              <el-button disabled style="background-color: #00baad; color: #fff"
                >一键下发</el-button
              >
            </div>
          </div>
        </template>
      </el-drawer>
      <!-- 分站使用模板 -->
      <el-drawer v-model="open_temp" custom-class="temp" close-on-click-modal :modal="true">
        <template #header>
          <div class="header">
            <div class="title">
              <img src="@/assets/images/图标.svg" alt="" />
              <div style="margin: 0 0 0 8px">模板库</div>
            </div>
          </div>
        </template>
        <template #default>
          <div class="temp_box" v-if="temp_page == 1">
            <div class="tabs">
              <div class="items tabs_active">
                全部模板
                <div class="num">3</div>
              </div>
              <div class="items">
                分站模板
                <div class="num">1</div>
              </div>
              <div class="items">
                电源模板
                <div class="num">2</div>
              </div>
            </div>
            <div class="temp_list">
              <div class="search">
                <el-input
                  v-model="input"
                  style="width: 384px"
                  suffix-icon="Search"
                  placeholder="请输入"
                />
                <div class="add_btn">
                  <img src="@/assets/icons/svg/addtotal.svg" alt="" />
                  新增
                </div>
              </div>
              <div class="list">
                <div class="items1">
                  <div class="top">
                    <div class="tag">分站</div>
                    <div class="name">回风巷分站模板</div>
                    <div class="btns">使用</div>
                    <div class="btns" @click="temp_page = 2">详情</div>
                  </div>
                  <div class="bottom">
                    <div class="b_box">
                      <div class="one">测点</div>
                      <div class="two">
                        <span>A07</span>
                        <span>A08</span>
                        <span>A09</span>
                      </div>
                    </div>
                    <div class="b_box">
                      <div class="one">使用次数</div>
                      <div class="three">7</div>
                    </div>
                  </div>
                </div>
                <div class="items2">
                  <div class="top">
                    <div class="tag tag2">电源</div>
                    <div class="name">回风巷分站模板</div>
                    <div class="btns">使用</div>
                    <div class="btns">详情</div>
                  </div>
                  <div class="bottom">
                    <div class="b_box">
                      <div class="one">电源类型</div>
                      <div class="two">KDW660-29BJ</div>
                    </div>
                    <div class="b_box">
                      <div class="one">电源类型</div>
                      <div class="two">1</div>
                    </div>
                    <div class="b_box">
                      <div class="one">测点</div>
                      <div class="two">
                        <span>A07</span>
                        <span>A08</span>
                        <span>A09</span>
                      </div>
                    </div>
                    <div class="b_box">
                      <div class="one">使用次数</div>
                      <div class="three">7</div>
                    </div>
                  </div>
                </div>
                <div class="items2">
                  <div class="top">
                    <div class="tag tag2">电源</div>
                    <div class="name">回风巷分站模板</div>
                    <div class="btns">使用</div>
                    <div class="btns">详情</div>
                  </div>
                  <div class="bottom">
                    <div class="b_box">
                      <div class="one">电源类型</div>
                      <div class="two">KDW660-29BJ</div>
                    </div>
                    <div class="b_box">
                      <div class="one">电源类型</div>
                      <div class="two">1</div>
                    </div>
                    <div class="b_box">
                      <div class="one">测点</div>
                      <div class="two">
                        <span>A07</span>
                        <span>A08</span>
                        <span>A09</span>
                      </div>
                    </div>
                    <div class="b_box">
                      <div class="one">使用次数</div>
                      <div class="three">7</div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="temp_box2" v-if="temp_page == 2">
            <div class="name">
              <span style="color: red">*</span>模板名称
              <div>回风巷分站模板</div>
            </div>
            <el-table
              :data="tableData"
              stripe
              style="width: 100%; height: calc(100% - 130px)"
              :header-row-style="{ backgroundColor: '#e3effe' }"
              :header-cell-style="{ backgroundColor: '#e3effe !important' }"
            >
              <el-table-column prop="address" label="测点号" />
              <el-table-column
                show-overflow-tooltip
                prop="address"
                label="传感器名称"
              />
              <el-table-column show-overflow-tooltip prop="work" label="单位" />
            </el-table>
          </div>
        </template>
        <template #footer>
          <div class="footer_btns" v-if="temp_page == 2">
            <div>
              <el-button type="primary">编辑</el-button>
            </div>
            <div>
              <el-button @click="temp_page = 1">返回</el-button>
              <el-button type="primary">使用模板</el-button>
            </div>
          </div>
        </template>
      </el-drawer>
      <!-- 通道配置 -->
      <div class="info channel" v-if="page == 2">
        <div class="channels">
          <div class="channels_head">
            <div class="title">
              <img src="@/assets/images/图标.svg" alt="" />
              <div style="margin: 0 0 0 8px">通道(20个)</div>
            </div>
            <div class="two">智能分配</div>
          </div>
          <div class="channels_box">
            <div class="items" :class="{select:sIndex == index}" v-for="(item,index) in channelList" :key="item" @click="getchannelInfo(index,item.id)">
              <div>{{item.name}}</div>
              <div class="xj">巡检周期<span>10s</span></div>
            </div>
          </div>
        </div>
        <div class="line" v-if="sIndex != null && channelInfo.length > 0"></div>
        <div class="subchannel" v-if="sIndex != null && channelInfo.length > 0">
          <div class="subchannel_head">
            <div class="title">
              <img src="@/assets/images/图标.svg" alt="" />
              <div style="margin: 0 0 0 8px;font-size: 16px;font-weight:700;">
                通道{{channelInfo[0].channelNo}}下属分站<span
                  style="
                    margin: 0 0 0 8px;
                    color: rgba(103, 194, 58, 1);
                    font-size: 14px;
                    font-weight:400;
                  "
                  >通道巡检周期10秒</span
                >
              </div>
            </div>
            <div class="two" @click="openupDateChannel">更换通道</div>
          </div>
          <div class="subchannel_box">
            <div class="s_item" :class="{select:stationBasicDtoList.includes(item)}" v-for="(item,index) in channelInfo" :key="item" @click="chooseStation(item,index)">
              <div class="left">
                <div class="title">分站编号</div>
                <div class="stationCode">{{item.stationCode}}</div>
              </div>
              <div class="right">
                <div>{{item.stationPlaceName}}</div>
                <div>{{item.ipAddr}}:{{item.ipPort}}</div>
              </div>
              <img v-if="stationBasicDtoList.includes(item)" src="@/assets/images/选中.svg" alt="" class="img">
            </div>
          </div>
        </div>
      </div>

      <!-- 新增开出口 -->
      <el-drawer v-model="open_port" custom-class="edit" @close="form_add = {}" close-on-click-modal :modal="true">
        <template #header>
          <div class="d_header">
            <div class="title">
              <img src="@/assets/images/图标.svg" alt="" />
              <div style="margin: 0 0 0 8px">开出口详情(所属分站{{ subStationInfo.stationCode }})</div>
            </div>
          </div>
        </template>
        <template #default>
          <div class="port_box">
            <el-form
                v-if="!controlPortTypeId"
                :model="form_add"
                label-width="auto"
                label-position="top"
                ref="formRef2"
              >
                <div class="boxone">
                  <el-row :gutter="16">
                    <el-col :span="6">
                      <el-form-item label="所属分站" >
                        <div class="data_item">
                          <el-input style="width: 200px" v-model="form_add.stationCode" disabled></el-input>
                        </div>
                      </el-form-item>
                    </el-col>
                    <el-col :span="6">
                      <el-form-item label="控制设备" >
                        <div class="data_item">
                          <el-select
                            style="width: 200px"
                            clearable
                            filterable
                            v-model="form_add.controlPortType"
                            placeholder="请选择"
                            @change="controlPortTypeChange"
                          >
                            <el-option
                              v-for="item in controlPortTypeList"
                              :key="item.code"
                              :label="item.name"
                              :value="item.code"
                            >
                            </el-option>
                          </el-select>
                        </div>
                      </el-form-item>
                    </el-col>
                    <el-col :span="12">
                      <el-form-item label="安装地点" >
                        <div class="data_item">
                          <el-select
                            clearable
                            filterable
                            allow-create
                            style="width: 416px"
                            v-model="form_add.pointPlaceId"
                            placeholder="请选择"
                            @change="pointPlaceIdopenChange"
                          >
                            <el-option
                              v-for="item in addressInfoList"
                              :key="item.id"
                              :label="item.placeName"
                              :value="item.id"
                            >
                            </el-option>
                          </el-select>
                        </div>
                      </el-form-item>
                    </el-col>
                  </el-row>
                  <el-row :gutter="16">
                    <el-col :span="12">
                      <el-form-item label="馈电测点" >
                        <div class="data_item">
                          <el-select
                            :disabled="form_add.controlPortType==2"
                            clearable
                            filterable
                            allow-create
                            style="width: 416px"
                            v-model="form_add.feedPointId"
                            placeholder="请选择"
                            @change="feedPointIdChange"
                          >
                            <el-option
                              v-for="item in feedPointIdList"
                              :key="item.pointId"
                              :label="item.pointId+'/'+item.sensorName+'/'+item.pointPlaceName"
                              :value="item.pointId"
                            >
                            </el-option>
                          </el-select>
                        </div>
                      </el-form-item>
                    </el-col>
                    <el-col :span="12">
                      <el-form-item>
                        <div class="data_item">
                          <div>
                            地理位置
                            <span style="color: rgba(64, 158, 255, 1)"
                              >GIS获取</span
                            >
                          </div>
                          <div class="fbc">
                            <el-input
                              v-model="form_add.locationX"
                              oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                            >
                              <template #prefix>
                                <span>X</span>
                              </template>
                            </el-input>
                            <el-input
                              v-model="form_add.locationY"
                              oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                            >
                              <template #prefix>
                                <span>Y</span>
                              </template>
                            </el-input>
                            <el-input
                              v-model="form_add.locationZ"
                              oninput="value =value.replace(/[^\-\d.]/g, '') .replace(/^\./g, '').replace(/\.{2,}/g,
    '.').replace(/(\.\d+)\./g, '$1') .replace(/(-)\./g, '$1') .replace(/\-{2,}/g, '-')
    .replace(/(\d+|\.)-/g, '$1') .replace(/-(0){2,}/g,'$1') .replace(/(-)0+(\d+)/g, '$1$2')
    .replace(/^0+(\d)/, '$1') .replace(/(\d{8})\d*/, '$1') .replace(/(\.\d{8})\d*/, '$1')"
                            >
                              <template #prefix>
                                <span>Z</span>
                              </template>
                            </el-input>
                          </div>
                        </div>
                      </el-form-item>
                    </el-col>

                  </el-row>
                </div>
            </el-form>
            <el-form class="formBox" v-if="controlPortTypeId" :model="form_add"
            label-position="top">
            <div class="el-drawer_mash desc_box">
                <el-row :gutter="20">
                                    <el-col :span="24">
                                        <p class="drawer_sub_title">
                                            <span class="sub_title_line">开出口基础信息</span>
                                        </p>
                                    </el-col>
                                    <el-col :span="6">
                                        <p>所属分站</p>
                                        <p>{{form_add.stationCode}}</p>
                                    </el-col>
                                    <el-col :span="6">
                                        <p>控制设备</p>
                                        <p>{{form_add.controlPortTypeName}}</p>
                                    </el-col>
                                    <el-col :span="12">
                                        <p>安装地点</p>
                                        <p>{{form_add.pointPlaceName}}</p>
                                    </el-col>
                                    <el-col :span="12" v-if="form_add.controlPortType !=2">
                                        <p>馈电测点</p>
                                        <p>{{form_add.feedPointId}}/{{form_add.feedSensorName}}/{{form_add.feedPlaceName}}
                                        </p>
                                    </el-col>
                                    <el-col :span="12">
                                        <p>设备地理位置</p>
                                        <p
                                            v-if="form_add.locationX!=null || form_add.locationY!=null || form_add.locationZ!=null">
                                            {{form_add.locationX}}.{{form_add.locationY}}.{{form_add.locationZ}}
                                        </p>
                                        <p v-else>-</p>
                                    </el-col>
                </el-row>
                <el-row :gutter="20">
                                    <el-col :span="24">
                                        <p class="drawer_sub_title">
                                            <span class="sub_title_line">控制源</span>
                                        </p>
                                        <vxe-table height="300" :data="controlSourceData.tabledata"
                                            border="inner">
                                            <vxe-column v-for="(item,index) in controlSourceData.tableheads"
                                                :field="item.field" :title="item.title" :params="{name:item.name}"
                                                :width="item.width?item.width:''" :key="index">
                                            </vxe-column>
                                        </vxe-table>
                                        <vxe-pager v-if="controlSourceData.total>0"
                                            @page-change="getcontrolSourceList" :background="true" class="allbk"
                                            align="right"
                                            :layouts="['PrevJump', 'PrevPage', 'JumpNumber', 'NextPage', 'NextJump', 'Sizes', 'FullJump', 'Total']"
                                            v-model:current-page="controlSourceData.query.pageNum"
                                            v-model:page-size="controlSourceData.query.pageSize"
                                            :total="controlSourceData.total">
                                        </vxe-pager>
                                    </el-col>
                </el-row>
            </div>
            </el-form>
          </div>
        </template>
        <template #footer>
          <div class="footer_btns">
            <div></div>
            <div>
              <el-button @click="open_port = false">取消</el-button>
              <el-button type="primary" @click="addopenClick">确定</el-button>
            </div>
          </div>
        </template>
      </el-drawer>

      <!-- 更换通道 -->
      <vxe-modal esc-closable destroy-on-close :lock-view="false" :width="448"
          :height="194" v-model="eidt_channel" resize :mask="true">
          <template #title>
              <div class="w100 h100 fsc mask_title">更换通道</div>
          </template>
          <template #default>
            <div class="eidt_channelBox">
              <div class="one">
                <div class="title">通道号</div>
                <el-select
                  style="width: 100%"
                  clearable
                  v-model="form_channel.channelNo"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in channelList"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id"
                  >
                  </el-option>
                </el-select>
              </div>
              <div class="footer_btn">
                  <el-button @click="cancel">取消</el-button>
                  <el-button type="primary" @click="confirmReplace">
                      确定
                  </el-button>
              </div>
            </div>
          </template>
      </vxe-modal>
    </div>
  </div>
</template>
<script setup>
import axios from "@/utils/request";
import { ElMessage } from "element-plus";
import { nextTick, onMounted, reactive } from "vue";
import { controlPortsList, getinfosearchAll,getPointIdsList } from "@/api/config";
import {table_headers} from '@/components/commonCom/table_headers';

let formA = ref();
let formE = ref();
let cascaderValue = ref();
const { proxy } = getCurrentInstance();
const page = ref(1);
const activeName = ref("1");
const activeNamePoint = ref("1");
const sIndex = ref(null)
const sIndex2 = ref(null)
const open_detail = ref(false);
const open_edit = ref(false);
const open_add = ref(false);
const open_add2 = ref(false);
const open_temp = ref(false);
const open_port = ref(false);
const showInput = ref(false);
const showInput2 = ref(false);
const showInput3 = ref(false);
const showPointAdd2 = ref(false);
const showcedian = ref(false);
const showPointAdd = ref();
const hiddDev = ref(false);
const addModalhasPreAlarm = ref(false); // 预报警全部详情
const addModalhasConstantPreAlarm = ref(false); // 恒值预报警全部详情
const cutValueListyou = ref(false);  //测点详情查看处理普通断电
const addModalconfig = ref(false);
const eidt_channel = ref(false);
const showMore = ref();
const showCaozuo = ref();
const showDetail = ref(null);
const showYichang = ref(null);
const tabPosition = ref("1");
const tabPosition2 = ref("1");
const radio1 = ref(""); //上下级分级切换
const temp_page = ref(1);
const filerArr = ref([
  { value: null, label: "全部" },
  { value: "0", label: "正常" },
  { value: "1", label: "异常" },
  { value: "2", label: "离线" },
]);
const props = ref({
  label: "areaName",
  value: "areaTypeId",
  children: "childList",
  emitPath: false,
  checkStrictly: true,
});
const form = ref({ status: null,orderByColumn:'error' });
const form2 = ref({});
const form_add = ref({});
const form_add2 = ref({
  gasDrainageGroupno: 1,
  hasUpGrandAlarm: false,
  hasDownGrandAlarm: false,
  hasMoreGrandAlarm: false,
  hasChangeGrandAlarm: false,
  calibration: {
    isCalibration:false
  },
  alarmBasic: {},
  prealarmBasic: {},
  upGrandalarmBasic: {
    grandalarmRate: {},
  },
  downGrandalarmBasic: {
    grandalarmRate: {},
  },
  cutArea: {},
  cutValueList: [
    {
      title: "断电配置",
      name: "1",
      cutStationList: [
        {
          controlPort: "",
          pointPlaceName: "",
        },
      ],
    },
  ],
});
const form_edit = ref({});
const formData2 = ref({}); // 表单--开出口
const form_point = ref({}); // 表单--开出口
const subStationList = ref([]);
const subStationInfo = ref({});
const areaList = ref([]);
const devList = ref([]);
const controlPorts = ref([]);
const addressInfoList = ref([]);
const searchTreeList = ref([]);
const channelNoList = ref([]);
const ationNosList = ref([]);
const substationType = ref([]);
const pointNoList = ref([]);
const stationBasicDtoList = ref([]);
const pointList = ref([]);
const sensorIdList = ref([]);
const mulsensorIdList = ref([]);
const templateTreeList = ref([]);
const placeTypeIdList = ref([]);
const expressionVoList = ref([]); //
const stationPlaceNamList = ref([]);
const channelInfo = ref([])
const controlPortTypeList = ref([
  {
    // 控制设备类型
    code: 1,
    name: "断电仪",
  },
  {
    code: 2,
    name: "声光报警",
  },
]);
const prealarmTimeoutData = ref([0, 0.5, 1, 3, 5, 10, 15, 20, 30]); // 超时
const feedPointIdList = ref([]);
const infosearchAllList = ref([]);
const channelList = ref([]);
const needPlaceType = ref(undefined);
const scaleDown = ref(undefined);
const scaleUp = ref(undefined);
const looksensorObj = ref(undefined); //查看传感器参数
const mulactiveNamePoint = ref(undefined); // 多参测点tab切换
const cutconfigId = ref(undefined);
const cutconfigIdTypestation = ref(undefined); //分站下拉选择
const cutconfigIdTypereq = ref(undefined); //配置走编辑还是新增接口
const datatreeCode = ref(undefined);  //左侧树形分站code 
const editpointId = ref(undefined); 
const curTreeId = ref(undefined);
const controlPortTypeId = ref(undefined);
const baohanunit = ref(""); //传感器名称下拉后单位
const baohanD = ref(""); //筛选首字母
const ordintranValue = ref(""); // 普通断电
const collapseAtive = ref(0);
const formDataconfig = ref({});
const form_channel = ref({})
const hasPreAlarmData = ref({
  condition: undefined,
  tableheads: computed(() => table_headers.prealarmBasic),
  tabledata: [],
  query: {
    pageNum: 1,
    pageSize: 10,
    condition: undefined,
  },
  total: 0,
  selList: [],
});
const hasConstantPreAlarmData = ref({
  condition: undefined,
  tableheads: computed(() => table_headers.constantPrealarm),
  tabledata: [],
  query: {
    pageNum: 1,
    pageSize: 10,
    condition: undefined,
  },
  total: 0,
  selList: [],
});
// 控制源
const controlSourceData = ref({
    tableheads: computed(() => table_headers.controlSource),
    tabledata: [],
    query: {
      pageNum: 1,
      pageSize: 10,
      controlPointIds: undefined
    },
    total: 0
}) 
const ponitAddUrl = ref('/point/add') 
const ponitEditUrl = ref('/point/edit') 
const ponitDelUrl = ref('/point/delete') 
const ponitdetailUrl = ref('/point/detail') 



// 快捷时间选择
const shortcuts = [
  {
    text: "昨天",
    value: () => {
      const end = new Date();
      const start = new Date();
      start.setDate(start.getDate() - 1);
      return [start, end];
    },
  },
  {
    text: "上周",
    value: () => {
      const end = new Date();
      const start = new Date();
      start.setDate(start.getDate() - 7);
      return [start, end];
    },
  },
];
const pointTypeList = ref([
  {
    value: 1,
    name: "普通测点",
  },
  {
    value: 2,
    name: "多参测点",
  },
  {
    value: 3,
    name: "虚拟测点",
  },
]);
const alarmBasicList = ref([
  {
    code: 0,
    name: "无",
  },
  {
    code: 1,
    name: "上限",
  },
  {
    code: 2,
    name: "下限",
  },
  {
    code: 3,
    name: "上下限",
  },
]);
const cutTypeList = ref([
  {
    //断电模式
    code: 1,
    name: "上限",
  },
  {
    code: 2,
    name: "下限",
  },
]);
const pointactiveNameList = ref([
  {
    name: "报警配置",
    type: 1,
  },
  {
    name: "分级配置",
    type: 2,
  },
  {
    name: "普通断电",
    type: 3,
  },
  {
    name: "区域断电",
    type: 4,
  },
]);

// 自定义校验ip
const validateip = (rule, value, callback) => {
  let reg =
    /^(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|[0-9])\.((1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.){2}(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)$/;
  if (!reg.test(value)) return callback(new Error("请输入正确的IP"));
  callback();
};
// 自定义校验端口
const validatePass = (rule, value, callback) => {
  let reg = new RegExp(
    /^([0-9]|[1-9]\d{1,3}|[1-5]\d{4}|6[0-4]\d{4}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/
  );
  if (!reg.test(value)) return callback(new Error("请输入正确端口(0-65535)"));
  callback();
};
// 上限报警值
    const validatealarmType1 = (rule, value, callback) => {
        if (Number(form_add2.value.alarmBasic.upAlarmValue) < Number(form_add2.value.alarmBasic.upRelieveValue))
            return callback(new Error("上限报警值大于等于上限解报值!"));

        if (!form_add2.value.alarmBasic.upAlarmValue || !form_add2.value.alarmBasic.upRelieveValue)
            return callback(new Error("请输入上限报警值或上限解报值!"));

        if (Number(form_add2.value.alarmBasic.upAlarmValue) > Number(scaleUp.value) || Number(form_add2.value
                .alarmBasic.upAlarmValue) < Number(scaleDown.value))
            return callback(new Error("上限报警值不在量程范围内" + scaleDown.value + '~' + scaleUp.value));

        if (Number(form_add2.value.alarmBasic.upRelieveValue) > Number(scaleUp.value) || Number(form_add2.value
                .alarmBasic.upRelieveValue) < Number(scaleDown.value))
            return callback(new Error("上限解报值不在量程范围内" + scaleDown.value + '~' + scaleUp.value));
        callback();

    }

    // 下限报警值
    const validatealarmType2 = (rule, value, callback) => {
        if (Number(form_add2.value.alarmBasic.downAlarmValue) > Number(form_add2.value.alarmBasic
                .downRelieveValue))
            return callback(new Error("上限报警值大于等于上限解报值!"));

        if (!form_add2.value.alarmBasic.downAlarmValue || !form_add2.value.alarmBasic.downRelieveValue)
            return callback(new Error("请输入上限报警值或上限解报值!"));

        if (Number(form_add2.value.alarmBasic.downAlarmValue) > Number(scaleUp.value) || Number(form_add2.value
                .alarmBasic.downAlarmValue) < Number(scaleDown.value))
            return callback(new Error("下限报警值不在量程范围内" + scaleDown.value + '~' + scaleUp.value));

        if (Number(form_add2.value.alarmBasic.downRelieveValue) > Number(scaleUp.value) || Number(form_add2.value
                .alarmBasic.downRelieveValue) < Number(scaleDown.value))
            return callback(new Error("下限解报值不在量程范围内" + scaleDown.value + '~' + scaleUp.value));
        callback();
    }
    // 断电值≥
    const validatecutValue = (rule, value, callback) => {
        if (Number(form_add2.value.cutArea.cutValue) < Number(form_add2.value.cutArea.resumeValue))
            return callback(new Error("断电值要大于等于复电值"));

        if (Number(form_add2.value.cutArea.cutValue) > Number(scaleUp.value) || Number(form_add2.value.cutArea
                .cutValue) < Number(scaleDown.value))
            return callback(new Error("断电值不在量程范围内" + scaleDown.value + '~' + scaleUp.value));
        callback();
    }
    const validatecutValue1 = (rule, value, callback) => {
        if (form_add2.value.cutValueList.length > 0) {
            form_add2.value.cutValueList.forEach((item, index) => {
                if (ordintranValue == index) {
                    if (item.cutType == 1) {
                        if (Number(item.cutValue) < Number(item.resumeValue))
                            return callback(new Error("上限断电值要大于等于上限复电值"));

                        if (Number(item.cutValue) > Number(scaleUp.value) || Number(item.cutValue) < Number(
                                scaleDown.value))
                            return callback(new Error("断电值不在量程范围内" + scaleDown.value + '~' + scaleUp.value));
                        callback()
                    } else {
                        if (Number(item.cutValue) > Number(item.resumeValue))
                            return callback(new Error("下限断电值要小于下限复电值"));

                        if (Number(item.cutValue) > Number(scaleUp.value) || Number(item.cutValue) < Number(
                                scaleDown.value))
                            return callback(new Error("断电值不在量程范围内" + scaleDown.value + '~' + scaleUp.value));
                        callback()
                    }


                }
            })
        }
    }
    const validatecutValue2 = (rule, value, callback) => {
        if (form_add2.value.cutValueList.length > 0) {
            form_add2.value.cutValueList.forEach((item, index) => {
                if (ordintranValue == index) {
                    if (item.cutType == 1) {
                        if (Number(item.cutValue) < Number(item.resumeValue))
                            return callback(new Error("上限断电值要大于等于上限复电值"));

                        if (Number(item.resumeValue) > Number(scaleUp.value) || Number(item.resumeValue) <
                            Number(scaleDown.value))
                            return callback(new Error("复电值不在量程范围内" + scaleDown.value + '~' + scaleUp.value));
                        callback()
                    } else {
                        if (Number(item.cutValue) > Number(item.resumeValue))
                            return callback(new Error("下限断电值要小于下限复电值"));

                        if (Number(item.resumeValue) > Number(scaleUp.value) || Number(item.resumeValue) <
                            Number(scaleDown.value))
                            return callback(new Error("复电值不在量程范围内" + scaleDown.value + '~' + scaleUp.value));
                        callback()
                    }

                }
            })
        }
        callback();
    }
    const validateupPrealarmValue = (rule, value, callback) => {
        if (!form_add2.value.prealarmBasic.upPrealarmValue)
            return callback(new Error("请输入上限预报值"));

        if (Number(form_add2.value.prealarmBasic.upPrealarmValue) > Number(form_add2.value.alarmBasic.upAlarmValue))
            return callback(new Error("上限预报值要小于上限报警值"));
        if (Number(form_add2.value.prealarmBasic.upPrealarmValue) < Number(form_add2.value.alarmBasic
                .downAlarmValue))
            return callback(new Error("上限预报值要大于下限报警值"));

        if (Number(form_add2.value.prealarmBasic.upPrealarmValue) > Number(scaleUp.value) || Number(form_add2.value
                .prealarmBasic.upPrealarmValue) < Number(scaleDown.value))
            return callback(new Error("上限预报值不在量程范围内" + scaleDown.value + '~' + scaleUp.value));
        callback();
    }
    const validateupPrealarmValue2 = (rule, value, callback) => {
        if (!form_add2.value.prealarmBasic.downPrealarmValue)
            return callback(new Error("请输入下限预报值"));

        if (Number(form_add2.value.prealarmBasic.downPrealarmValue) > Number(form_add2.value.alarmBasic
                .upAlarmValue))
            return callback(new Error("下限预报值要小于上限报警值"));
        if (Number(form_add2.value.prealarmBasic.downPrealarmValue) < Number(form_add2.value.alarmBasic
                .downAlarmValue))
            return callback(new Error("下限预报值要大于下限报警值"));

        if (Number(form_add2.value.prealarmBasic.downPrealarmValue) > Number(scaleUp.value) || Number(form_add2.value.prealarmBasic.downPrealarmValue) < Number(scaleDown.value))
            return callback(new Error("下限预报值不在量程范围内" + scaleDown.value + '~' + scaleUp.value));
        callback();
    }
    /**
     * 分级报警
     */
    // 上限-持续时间
    // 6一级=二级>三级>四级>五级>六级

    const grandsixTimevalidate = (rule, value, callback) => {
        if (value > Number(form_add2.value.upGrandalarmBasic.grandfiveTime) || value == Number(form_add2.value
                .upGrandalarmBasic.grandfiveTime))
            return callback(new Error("六级报警持续时间要小于五级报警持续时间"));
        callback();
    }
    const grandfiveTimevalidate = (rule, value, callback) => {
        if (value < Number(form_add2.value.upGrandalarmBasic.grandsixTime) || value == Number(form_add2.value
                .upGrandalarmBasic.grandsixTime))
            return callback(new Error("六级报警持续时间要小于五级报警持续时间"));
        if (value > Number(form_add2.value.upGrandalarmBasic.grandfourTime) || value == Number(form_add2.value
                .upGrandalarmBasic.grandfourTime))
            return callback(new Error("五级报警持续时间要小于四级报警持续时间"));
        callback();

    }
    const grandfourTimevalidate = (rule, value, callback) => {
        if (value < Number(form_add2.value.upGrandalarmBasic.grandfiveTime) || value == Number(form_add2.value
                .upGrandalarmBasic.grandfiveTime))
            return callback(new Error("五级报警持续时间要小于四级报警持续时间"));
        if (value > Number(form_add2.value.upGrandalarmBasic.grandthreeTime) || value == Number(form_add2.value
                .upGrandalarmBasic.grandthreeTime))
            return callback(new Error("四级报警持续时间要小于三级报警持续时间"));
        callback();
    }
    const grandthreeTimevalidate = (rule, value, callback) => {
        if (value < Number(form_add2.value.upGrandalarmBasic.grandfourTime) || value == Number(form_add2.value
                .upGrandalarmBasic.grandfourTime))
            return callback(new Error("四级报警持续时间要小于三级报警持续时间"));
        if (value > Number(form_add2.value.upGrandalarmBasic.grandtwoTime) || value == Number(form_add2.value
                .upGrandalarmBasic.grandtwoTime))
            return callback(new Error("三级报警持续时间要小于二级报警持续时间"));
        callback();
    }
    const grandtwoTimevalidate = (rule, value, callback) => {
        if (value < Number(form_add2.value.upGrandalarmBasic.grandthreeTime) || value == Number(form_add2.value
                .upGrandalarmBasic.grandthreeTime))
            return callback(new Error("三级报警持续时间要小于二级报警持续时间"));
        if (value != Number(form_add2.value.upGrandalarmBasic.grandoneTime))
            return callback(new Error("二级报警持续时间要等于一级报警持续时间"));
        callback();
    }
    const grandoneTimevalidate = (rule, value, callback) => {
        if (value != Number(form_add2.value.upGrandalarmBasic.grandtwoTime))
            return callback(new Error("二级报警持续时间要等于一级报警持续时间"));
        callback();
    }
    // 报警值一级>二级>三级>四级
    const grandfourValuevalidate = (rule, value, callback) => {
        if (value > Number(form_add2.value.upGrandalarmBasic.grandthreeValue) || value == Number(form_add2.value
                .upGrandalarmBasic.grandthreeValue))
            return callback(new Error("四级报警值要小于三级报警值"));
        callback();
    }
    const grandthreeValuevalidate = (rule, value, callback) => {
        if (value < Number(form_add2.value.upGrandalarmBasic.grandfourValue) || value == Number(form_add2.value
                .upGrandalarmBasic.grandfourValue))
            return callback(new Error("四级报警值要小于三级报警值"));
        if (value > Number(form_add2.value.upGrandalarmBasic.grandtwoValue) || value == Number(form_add2.value
                .upGrandalarmBasic.grandtwoValue))
            return callback(new Error("三级报警值要小于二级报警值"));
        callback();
    }
    const grandtwoValuevalidate = (rule, value, callback) => {
        if (value < Number(form_add2.value.upGrandalarmBasic.grandthreeValue) || value == Number(form_add2.value
                .upGrandalarmBasic.grandthreeValue))
            return callback(new Error("三级报警值要小于二级报警值"));
        if (value > Number(form_add2.value.upGrandalarmBasic.grandoneValue) || value == Number(form_add2.value
                .upGrandalarmBasic.grandoneValue))
            return callback(new Error("二级报警值要小于一级报警值"));
        callback();
    }
    const grandoneValuevalidate = (rule, value, callback) => {
        if (value < Number(form_add2.value.upGrandalarmBasic.grandtwoValue) || value == Number(form_add2.value
                .upGrandalarmBasic.grandtwoValue))
            return callback(new Error("二级报警值要小于一级报警值"));
        callback();
    }
    // 涨幅≥一级>二级>三级>四级
    const rateFourValuevalidate = (rule, value, callback) => {
        if (value > Number(form_add2.value.upGrandalarmBasic.grandalarmRate.rateThreeValue) || value == Number(form_add2.value.upGrandalarmBasic.grandalarmRate.rateThreeValue))
            return callback(new Error("四级涨幅要小于三级涨幅"));
        callback();
    }
    const rateThreeValuevalidate = (rule, value, callback) => {
        if (value < Number(form_add2.value.upGrandalarmBasic.grandalarmRate.rateFourValue) || value == Number(form_add2.value.upGrandalarmBasic.grandalarmRate.rateFourValue))
            return callback(new Error("四级涨幅要小于三级涨幅"));
        if (value > Number(form_add2.value.upGrandalarmBasic.grandalarmRate.rateTwoValue) || value == Number(form_add2.value.upGrandalarmBasic.grandalarmRate.rateTwoValue))
            return callback(new Error("三级涨幅要小于二级涨幅"));
        callback();
    }
    const rateTwoValuevalidate = (rule, value, callback) => {
        if (value < Number(form_add2.value.upGrandalarmBasic.grandalarmRate.rateThreeValue) || value == Number(form_add2.value.upGrandalarmBasic.grandalarmRate.rateThreeValue))
            return callback(new Error("三级涨幅要小于二级涨幅"));
        if (value > Number(form_add2.value.upGrandalarmBasic.grandalarmRate.rateOneValue) || value == Number(form_add2.value.upGrandalarmBasic.grandalarmRate.rateOneValue))
            return callback(new Error("二级涨幅要小于一级涨幅"));
        callback();
    }
    const rateOneValuevalidate = (rule, value, callback) => {
        if (value < Number(form_add2.value.upGrandalarmBasic.grandalarmRate.rateTwoValue) || value == Number(form_add2.value.upGrandalarmBasic.grandalarmRate.rateTwoValue))
            return callback(new Error("二级涨幅要小于一级涨幅"));
        callback();
    }
    // 下限
    // 报警值一级<二级<三级<四级<五级<六级
    // 6
    const grandsixValuevalidate1 = (rule, value, callback) => {
        if (value < Number(form_add2.value.downGrandalarmBasic.grandfiveValue) || value == Number(form_add2.value
                .downGrandalarmBasic.grandfiveValue))
            return callback(new Error("六级报警值要大于五级报警值"));
        callback();
    }
    // 5
    const grandfiveValuevalidate1 = (rule, value, callback) => {
        if (value > Number(form_add2.value.downGrandalarmBasic.grandsixValue) || value == Number(form_add2.value
                .downGrandalarmBasic.grandsixValue))
            return callback(new Error("五级报警值要小于六级报警值"));
        if (value < Number(form_add2.value.downGrandalarmBasic.grandfourValue) || value == Number(form_add2.value
                .downGrandalarmBasic.grandfourValue))
            return callback(new Error("五级报警值要大于四级报警值"));
        callback();
    }
    // 4
    const grandfourValuevalidate1 = (rule, value, callback) => {
        if (value > Number(form_add2.value.downGrandalarmBasic.grandfiveValue) || value == Number(form_add2.value
                .downGrandalarmBasic.grandfiveValue))
            return callback(new Error("四级报警值要小于五级报警值"));
        if (value < Number(form_add2.value.downGrandalarmBasic.grandthreeValue) || value == Number(form_add2.value
                .downGrandalarmBasic.grandthreeValue))
            return callback(new Error("四级报警值要大于三级报警值"));
        callback();
    }
    // 3
    const grandthreeValuevalidate1 = (rule, value, callback) => {
        if (value > Number(form_add2.value.downGrandalarmBasic.grandfourValue) || value == Number(form_add2.value
                .downGrandalarmBasic.grandfourValue))
            return callback(new Error("三级报警值要小于四级报警值"));
        if (value < Number(form_add2.value.downGrandalarmBasic.grandtwoValue) || value == Number(form_add2.value
                .downGrandalarmBasic.grandtwoValue))
            return callback(new Error("三级报警值要大于二级报警值"));
        callback();
    }
    // 2
    const grandtwoValuevalidate1 = (rule, value, callback) => {
        if (value > Number(form_add2.value.downGrandalarmBasic.grandthreeValue) || value == Number(form_add2.value
                .downGrandalarmBasic.grandthreeValue))
            return callback(new Error("二级报警值要小于三级报警值"));
        if (value < Number(form_add2.value.downGrandalarmBasic.grandoneValue) || value == Number(form_add2.value
                .downGrandalarmBasic.grandoneValue))
            return callback(new Error("二级报警值要大于一级报警值"));
        callback();
    }
    // 1
    const grandoneValuevalidate1 = (rule, value, callback) => {
        if (value > Number(form_add2.value.downGrandalarmBasic.grandtwoValue))
            return callback(new Error("二级报警值要小于一级报警值"));
        callback();
    }
    // 持续时间
    // 6
    const grandsixTimevalidate1 = (rule, value, callback) => {
        if (value < Number(form_add2.value.downGrandalarmBasic.grandfiveTime) || value == Number(form_add2.value
                .downGrandalarmBasic.grandfiveTime))
            return callback(new Error("六级持续时间要大于五级持续时间"));
        callback();
    }
    // 5
    const grandfiveTimevalidate1 = (rule, value, callback) => {
        if (value > Number(form_add2.value.downGrandalarmBasic.grandsixTime) || value == Number(form_add2.value
                .downGrandalarmBasic.grandsixTime))
            return callback(new Error("五级持续时间要小于六级持续时间"));
        if (value < Number(form_add2.value.downGrandalarmBasic.grandfourTime) || value == Number(form_add2.value
                .downGrandalarmBasic.grandfourTime))
            return callback(new Error("五级持续时间要大于四级持续时间"));
        callback();
    }
    // 4
    const grandfourTimevalidate1 = (rule, value, callback) => {
        if (value > Number(form_add2.value.downGrandalarmBasic.grandfiveTime) || value == Number(form_add2.value
                .downGrandalarmBasic.grandfiveTime))
            return callback(new Error("四级持续时间要小于五级持续时间"));
        if (value < Number(form_add2.value.downGrandalarmBasic.grandthreeTime) || value == Number(form_add2.value
                .downGrandalarmBasic.grandthreeTime))
            return callback(new Error("四级持续时间要大于三级持续时间"));
        callback();
    }
    // 3
    const grandthreeTimevalidate1 = (rule, value, callback) => {
        if (value > Number(form_add2.value.downGrandalarmBasic.grandfourTime) || value == Number(form_add2.value
                .downGrandalarmBasic.grandfourTime)) {
            return callback(new Error("三级持续时间要小于四级持续时间"));
        }
        if (value < Number(form_add2.value.downGrandalarmBasic.grandtwoTime) || value == Number(form_add2.value
                .downGrandalarmBasic.grandtwoTime)) {
            return callback(new Error("三级持续时间要大于二级持续时间"));
        }
        callback();
    }
    // 2
    const grandtwoTimevalidate1 = (rule, value, callback) => {
        if (value > Number(form_add2.value.downGrandalarmBasic.grandthreeTime) || value == Number(form_add2.value
                .downGrandalarmBasic.grandthreeTime))
            return callback(new Error("二级持续时间要小于三级持续时间"));
        if (value != Number(form_add2.value.downGrandalarmBasic.grandoneTime))
            return callback(new Error("二级持续时间要等于一级持续时间"));
        callback();
    }
    // 1
    const grandoneTimevalidate1 = (rule, value, callback) => {
        if (value != Number(form_add2.value.downGrandalarmBasic.grandtwoTime))
            return callback(new Error("二级持续时间要等于一级持续时间"));
        callback();
    }
    // 涨幅
    // 6
    const grandsixRatevalidate1 = (rule, value, callback) => {
        if (value < Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateFiveValue) || value == Number(
                form_add2.value.downGrandalarmBasic.grandalarmRate.rateFiveValue))
            return callback(new Error("五级跌幅要小于六级跌幅"));
        callback();
    }
    // 5
    const grandfiveRatevalidate1 = (rule, value, callback) => {
        if (value > Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateSixValue) || value == Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateSixValue))
            return callback(new Error("五级跌幅要小于六级跌幅"));
        if (value < Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateFourValue) || value == Number(
                form_add2.value.downGrandalarmBasic.grandalarmRate.rateFourValue))
            return callback(new Error("五级跌幅要大于四级跌幅"));
        callback();
    }
    // 4
    const grandfourRatevalidate1 = (rule, value, callback) => {
        if (value > Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateFiveValue) || value == Number(
                form_add2.value.downGrandalarmBasic.grandalarmRate.rateFiveValue))
            return callback(new Error("四级跌幅要小于五级跌幅"));
        if (value < Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateThreeValue) || value == Number(
                form_add2.value.downGrandalarmBasic.grandalarmRate.rateThreeValue))
            return callback(new Error("四级跌幅要大于三级跌幅"));
        callback();
    }
    // 3
    const grandthreeRatevalidate1 = (rule, value, callback) => {
        if (value > Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateFourValue) || value == Number(
                form_add2.value.downGrandalarmBasic.grandalarmRate.rateFourValue))
            return callback(new Error("三级跌幅要小于四级跌幅"));
        if (value > Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateTwoValue) || value == Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateTwoValue))
            return callback(new Error("三级跌幅要大于二级跌幅"));
        callback();
    }
    // 2
    const grandtwoRatevalidate1 = (rule, value, callback) => {
        if (value > Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateThreeValue) || value == Number(
                form_add2.value.downGrandalarmBasic.grandalarmRate.rateThreeValue))
            return callback(new Error("二级跌幅要小于三级跌幅"));
        if (value < Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateOneValue) || value == Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateOneValue))
            return callback(new Error("二级跌幅要大于一级跌幅"));
        callback();
    }
    // 1
    const grandoneRatevalidate1 = (rule, value, callback) => {
        if (value > Number(form_add2.value.downGrandalarmBasic.grandalarmRate.rateTwoValue))
            return callback(new Error("二级跌幅要大于一级跌幅"));
        callback();
    }
    // 虚拟测点
    const mulupAlarmValuevalite = (rule, value, callback) => {
        form_add2.value.multiplePointBranchList.forEach(item => {
            if (item.obj.alarmBasic != null) {
                if (!Number(item.obj.alarmBasic.upAlarmValue) || !Number(item.obj.alarmBasic
                        .upRelieveValue))
                    return callback(new Error("请输入上限报警值或解报值"));
                if (Number(item.obj.alarmBasic.upAlarmValue) < Number(item.obj.alarmBasic.upRelieveValue))
                    return callback(new Error("上限报警值要大于解报值"));
                callback()
            }
        })
    }
    const muldownAlarmValuevalite = (rule, value, callback) => {
        form_add2.value.multiplePointBranchList.forEach(item => {
            if (item.obj.alarmBasic != null) {
                if (!Number(item.obj.alarmBasic.downAlarmValue) || !Number(item.obj.alarmBasic
                        .downRelieveValue))
                    return callback(new Error("请输入下限报警值或解报值"));
                if (Number(item.obj.alarmBasic.downAlarmValue) > Number(item.obj.alarmBasic
                        .downRelieveValue))
                    return callback(new Error("下限报警值要小于解报值"));
                callback()
            }
        })
    }
    const mulmulcutValue = (rule, value, callback) => {
        form_add2.value.multiplePointBranchList.forEach(item => {
            if (item.obj.cutValueList != null && item.obj.cutValueList.length > 0) {
                item.obj.cutValueList.forEach(item1 => {
                    if (Number(item1.cutValue) < Number(item1.resumeValue))
                        return callback(new Error("上限断电值要大于复电值"));
                    callback()
                })
            }
        })
    }
    const mulresumeValue = (rule, value, callback) => {
        form_add2.value.multiplePointBranchList.forEach(item => {
            if (item.obj.cutValueList != null && item.obj.cutValueList.length > 0) {
                item.obj.cutValueList.forEach(item1 => {
                    if (Number(item1.cutValue) < Number(item1.resumeValue))
                        return callback(new Error("上限断电值要小于复电值"));
                    callback()
                })
            }
        })
    }
    const mulmulcutValue1 = (rule, value, callback) => {
        form_add2.value.multiplePointBranchList.forEach(item => {
            if (item.obj.cutValueList != null && item.obj.cutValueList.length > 0) {
                item.obj.cutValueList.forEach(item1 => {
                    if (Number(item1.cutValue) > Number(item1.resumeValue))
                        return callback(new Error("下限断电值要小于复电值"));
                    callback()
                })
            }
        })
    }
    const mulresumeValue1 = (rule, value, callback) => {
        form_add2.value.multiplePointBranchList.forEach(item => {
            if (item.obj.cutValueList != null && item.obj.cutValueList.length > 0) {
                item.obj.cutValueList.forEach(item1 => {
                    if (Number(item1.cutValue) > Number(item1.resumeValue))
                        return callback(new Error("下限断电值要小于复电值"));
                    callback()
                })
            }
        })
    }
    const mulareacutValue = (rule, value, callback) => {
        form_add2.value.multiplePointBranchList.forEach(item => {
            if (item.obj.cutArea != null) {
                if (Number(item.obj.cutArea.cutValue) < Number(item.obj.cutArea.resumeValue))
                    return callback(new Error("断电值要大于复电值"));
                callback()
            }
        })
    }
    const mularearesumeValue = (rule, value, callback) => {
        form_add2.value.multiplePointBranchList.forEach(item => {
            if (item.obj.cutArea != null) {
                if (Number(item.obj.cutArea.cutValue) < Number(item.obj.cutArea.resumeValue))
                    return callback(new Error("断电值要大于复电值"));
                callback()
            }
        })
    }


// 编辑分站表单校验规则
const rules = reactive({
  stationCode: [
    {
      required: true,
      message: "请选择分站编号",
      trigger: "change",
    },
  ],
  stationTypeId: [
    {
      required: true,
      message: "请选择分站类型",
      trigger: "change",
    },
  ],
  stationPlaceName: [
    {
      required: true,
      message: "请选择安装地点",
      trigger: "change",
    },
  ],
  stationAreaId: [
    {
      required: true,
      message: "请选择所在区域",
      trigger: "change",
    },
  ],
  ipAddr: [
    {
      required: true,
      message: "请输入IP",
      trigger: "blur",
    },
    {
      validator: validateip,
      trigger: "blur",
    },
  ],
  ipPort: [
    {
      required: true,
      message: "请输入端口",
      trigger: "blur",
    },
    {
      validator: validatePass,
      trigger: "blur",
    },
  ],
});
//
const rulesconfig = reactive({
  controlPortType: [
    {
      required: true,
      message: "请选择控制设备",
      trigger: "change",
    },
  ],
  pointPlaceName: [
    {
      required: true,
      message: "请选择安装地点",
      trigger: "change",
    },
  ],
  feedPointId: [
    {
      required: true,
      message: "请选择馈电测点",
      trigger: "change",
    },
  ],
});
// 测点表单校验规则
const rules1 = reactive({
  pointCode: [
    {
      required: true,
      message: "请选择测点编号",
      trigger: "change",
    },
  ],
  pointType: [
    {
      required: true,
      message: "请选择测点类型",
      trigger: "change",
    },
  ],
  sensorId: [
    {
      required: true,
      message: "请选择传感器名称",
      trigger: "change",
    },
  ],
  templateId: [
    {
      required: true,
      message: "请选择模版名称",
      trigger: "change",
    },
  ],
  pointPlaceName: [
    {
      required: true,
      message: "请选择安装地点",
      trigger: "change",
    },
  ],
  pointAreaId: [
    {
      required: true,
      message: "请选择所在区域",
      trigger: "change",
    },
  ],
  placeTypeId: [
    {
      required: true,
      message: "请选择地点类型",
      trigger: "change",
    },
  ],
  gasDrainageGroupno: [
    {
      required: true,
      message: "请选择瓦斯抽放监测点组别",
      trigger: "change",
    },
  ],
  "prealarmBasic.constantTime": [
    {
      required: true,
      message: "请输入恒值持续时间",
      trigger: "blur",
    },
  ],
  "calibration.intervalTime": [
    {
      required: true,
      message: "请输入标校间隔时刻",
      trigger: "blur",
    },
    {
      type: "number",
      min: 1,
      max: 365,
      message: "大小要在1到365",
      trigger: "blur",
    },
  ],
  "prealarmBasic.upPrealarmValue": [
    {
      required: true,
      validator: validateupPrealarmValue,
      trigger: "blur",
    },
  ],
  "prealarmBasic.downPrealarmValue": [
    {
      required: true,
      validator: validateupPrealarmValue2,
      trigger: "blur",
    },
  ],
  "alarmBasic.alarmType": [
    {
      required: true,
      message: "请选择报警模式",
      trigger: "change",
    },
  ],
  "alarmBasic.alarmType1": [
    {
      required: true,
      validator: validatealarmType1,
      trigger: "blur",
    },
  ],
  "alarmBasic.alarmType2": [
    {
      required: true,
      validator: validatealarmType2,
      trigger: "blur",
    },
  ],
  "upGrandalarmBasic.grandalarmRate.thresholdValue": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
  ],
  "upGrandalarmBasic.grandalarmRate.rateCycle": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
  ],
  "upGrandalarmBasic.grandalarmRate.rateFourValue": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      required: true,
      validator: rateFourValuevalidate,
      trigger: "blur",
    },
  ],
  "upGrandalarmBasic.grandalarmRate.rateThreeValue": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: rateThreeValuevalidate,
      trigger: "blur",
    },
  ],
  "upGrandalarmBasic.grandalarmRate.rateTwoValue": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: rateTwoValuevalidate,
      trigger: "blur",
    },
  ],
  "upGrandalarmBasic.grandalarmRate.rateOneValue": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: rateOneValuevalidate,
      trigger: "blur",
    },
  ],
  "upGrandalarmBasic.grandsixTime": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: rateOneValuevalidate,
      trigger: "blur",
    },
  ],
  "upGrandalarmBasic.grandfiveTime": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandfiveTimevalidate,
      trigger: "blur",
    },
  ],
  "upGrandalarmBasic.grandfourValue": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      required: true,
      validator: grandfourValuevalidate,
      trigger: "blur",
    },
  ],
  "upGrandalarmBasic.grandfourTime": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandfourTimevalidate,
      trigger: "blur",
    },
  ],
  "upGrandalarmBasic.grandthreeValue": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandthreeValuevalidate,
      trigger: "blur",
    },
  ],
  "upGrandalarmBasic.grandthreeTime": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandthreeTimevalidate,
      trigger: "blur",
    },
  ],
  "upGrandalarmBasic.grandtwoValue": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandtwoValuevalidate,
      trigger: "blur",
    },
  ],
  "upGrandalarmBasic.grandtwoTime": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandtwoTimevalidate,
      trigger: "blur",
    },
  ],
  "upGrandalarmBasic.grandoneValue": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandoneValuevalidate,
      trigger: "blur",
    },
  ],
  "upGrandalarmBasic.grandoneTime": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandoneTimevalidate,
      trigger: "blur",
    },
  ],
  "downGrandalarmBasic.grandsixValue": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandsixValuevalidate1,
      trigger: "blur",
    },
  ],
  "downGrandalarmBasic.grandsixTime": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandsixTimevalidate1,
      trigger: "blur",
    },
  ],
  "downGrandalarmBasic.grandfiveValue": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandfiveValuevalidate1,
      trigger: "blur",
    },
  ],
  "downGrandalarmBasic.grandfiveTime": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandfiveTimevalidate1,
      trigger: "blur",
    },
  ],
  "downGrandalarmBasic.grandfourValue": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandfourValuevalidate1,
      trigger: "blur",
    },
  ],
  "downGrandalarmBasic.grandfourTime": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandfourTimevalidate1,
      trigger: "blur",
    },
  ],
  "downGrandalarmBasic.grandthreeValue": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandthreeValuevalidate1,
      trigger: "blur",
    },
  ],
  "downGrandalarmBasic.grandthreeTime": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandthreeTimevalidate1,
      trigger: "blur",
    },
  ],
  "downGrandalarmBasic.grandtwoValue": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandtwoValuevalidate1,
      trigger: "blur",
    },
  ],
  "downGrandalarmBasic.grandtwoTime": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandtwoTimevalidate1,
      trigger: "blur",
    },
  ],
  "downGrandalarmBasic.grandoneValue": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandoneValuevalidate1,
      trigger: "blur",
    },
  ],
  "downGrandalarmBasic.grandoneTime": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandoneTimevalidate1,
      trigger: "blur",
    },
  ],
  "downGrandalarmBasic.grandalarmRate.thresholdValue": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
  ],
  "downGrandalarmBasic.grandalarmRate.rateCycle": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
  ],
  "downGrandalarmBasic.grandalarmRate.rateSixValue": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandsixRatevalidate1,
      trigger: "blur",
    },
  ],
  "downGrandalarmBasic.grandalarmRate.rateFiveValue": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandfiveRatevalidate1,
      trigger: "blur",
    },
  ],
  "downGrandalarmBasic.grandalarmRate.rateFourValue": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandfourRatevalidate1,
      trigger: "blur",
    },
  ],
  "downGrandalarmBasic.grandalarmRate.rateThreeValue": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandthreeRatevalidate1,
      trigger: "blur",
    },
  ],
  "downGrandalarmBasic.grandalarmRate.rateTwoValue": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandtwoRatevalidate1,
      trigger: "blur",
    },
  ],
  "downGrandalarmBasic.grandalarmRate.rateOneValue": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: grandoneRatevalidate1,
      trigger: "blur",
    },
  ],
  "cutArea.areaIdList": [
    {
      required: true,
      message: "请选择",
      trigger: "change",
    },
  ],
  "cutArea.cutValue": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: validatecutValue,
      trigger: "blur",
    },
  ],
  "cutArea.resumeValue": [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
  ],
  field_cutType: [
    {
      required: true,
      message: "请选择",
      trigger: "change",
    },
  ],
  field_cutValue: [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: validatecutValue1,
      trigger: "blur",
    },
  ],
  field_resumeValue: [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: validatecutValue2,
      trigger: "blur",
    },
  ],
  field_stationPlaceName: [
    {
      required: true,
      message: "请选择",
      trigger: "change",
    },
  ],
  // 多参测点
  field_mulalarmType: [
    {
      required: true,
      message: "请选择",
      trigger: "change",
    },
  ],
  field_mulupAlarmValue: [
    {
      required: true,
      validator: mulupAlarmValuevalite,
      trigger: "blur",
    },
  ],
  field_muldownAlarmValue: [
    {
      required: true,
      validator: muldownAlarmValuevalite,
      trigger: "blur",
    },
  ],
  field_mulupPrealarmValue: [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
  ],
  field_muldownPrealarmValue: [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
  ],
  field_mulprealarmTimeout: [
    {
      required: true,
      message: "请选择",
      trigger: "change",
    },
  ],
  field_mulconstantTime: [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
  ],
  field_mulupthresholdValue: [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
  ],
  field_muluprateCycle: [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
  ],
  field_muldownthresholdValue: [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
  ],
  field_muldownrateCycle: [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
  ],
  field_mulcutType: [
    {
      required: true,
      message: "请选择",
      trigger: "change",
    },
  ],
  field_mulcutValue: [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: mulmulcutValue,
      trigger: "blur",
    },
  ],
  field_mulresumeValue: [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: mulresumeValue,
      trigger: "blur",
    },
  ],
  field_mulcutValue1: [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: mulmulcutValue1,
      trigger: "blur",
    },
  ],
  field_mulresumeValue1: [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: mulresumeValue1,
      trigger: "blur",
    },
  ],
  field_mulstationPlaceName: [
    {
      required: true,
      message: "请选择",
      trigger: "change",
    },
  ],
  field_mulcutAreaareaIdList: [
    {
      required: true,
      message: "请选择",
      trigger: "change",
    },
  ],
  field_mulcutAreacutValue: [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: mulareacutValue,
      trigger: "blur",
    },
  ],
  field_mulcutArearesumeValue: [
    {
      required: true,
      message: "请输入",
      trigger: "blur",
    },
    {
      validator: mularearesumeValue,
      trigger: "blur",
    },
  ],
});

// 点击操作列
const cliclCaozuo = (n, obj) => {
  if (n == 1) {
    subStationInfo.value = obj;
    open_detail.value = true;
  } else if (n == 2) {
    open_temp.value = true;
  }
};

// 点击隐藏设备列表
const hiddDevice = () => {
  hiddDev.value = true;
};

// 点击分站
const clicksSub = (obj,index) => {
  if(sIndex2.value == index){
    sIndex2.value = null
  }else{
    sIndex2.value = index
    subStationInfo.value = obj;
    getControlPorts(obj.stationCode);
    getPointList(obj.stationCode);
    if (subStationInfo.value.pointInfos == null) {
      subStationInfo.value.pointInfos = [];
    }
    showcedian.value = true;
    hiddDev.value = true;
  }
};
// 收起分站
const closeSub = () => {
  showcedian.value = false;
  hiddDev.value = false;
  sIndex2.value = null
};
// 扫描设备
const scanDev = () =>{
  hiddDev.value = false
  showcedian.value = false;
  sIndex2.value = null
  getDevtList()
}

// 搜索
const searchSatation = (val) =>{
  console.log(val);
  
  form.value.key = val
  getSubStation()
}
// 展开搜索框1
const openSearch = () =>{
  showInput.value = true
  nextTick(()=>{
    proxy.$refs["input1"].focus()
  })
}
// 展开搜索框2
const openSearch2 = () =>{
  showInput2.value = true
  nextTick(()=>{
    proxy.$refs["input2"].focus()
  })
}
// 展开搜索框3
const openSearch3 = () =>{
  showInput3.value = true
  nextTick(()=>{
    proxy.$refs["input3"].focus()
  })
}

// 获取分站列表
const getSubStation = () => {
  axios.post("/station/list", form.value).then((res) => {
    subStationList.value = res.data.list;
  });
};
// 获取区域下拉
const getAreaList = () => {
  axios.post("/area/info/searchTree", {}).then((res) => {
    areaList.value = res.data;
  });
};
// 馈电测点下拉 /controlPort/feedList
const getFeedList = () =>{
  axios.get('/controlPort/feedList').then(res => {
    feedPointIdList.value = res.data
  })
}

//
const handleChange = (val) => {
  if (val != '') {
    getSubStation();
  } else {
    form.value.status = null
    getSubStation();
  }
};
const handleChange3 = (val) => {
  if (val != '') {
    getSubStation();
  } else {
    form.value.status = null
    getSubStation();
  }
};

// 获取设备列表
const getDevtList = () => {
  axios.post("/point/allList", form2.value).then((res) => {
    devList.value = res.data;
  });
};
const handleChange2 = (val) => {
  if (val) {
    getDevtList();
  } else {
    form2.value = {};
    getDevtList();
  }
};
const handleChange4 = (val) => {
  if (val) {
    getDevtList();
  } else {
    form2.value = {};
    getDevtList();
  }
};

// 根据分站查开出口
const getControlPorts = (id) => {
  axios.get(`/station/controlPorts?stationCode=${id}`).then((res) => {
    controlPorts.value = res.data;
  });
};

const handleChange5 = (val) => {
  if (val) {
    getPointList(subStationInfo.value.stationCode);
  } else {
    form_point.value.status = null;
    getPointList(subStationInfo.value.stationCode);
  }
}
const handleChange6 = (val) => {
  if (val) {
    getPointList(subStationInfo.value.stationCode);
  } else {
    form_point.value.key = '';
    getPointList(subStationInfo.value.stationCode);
  }
};
// 根据分站查测点
const getPointList = (id) => {
  form_point.value.stationCode = id
  axios.post("/point/allList",form_point.value).then((res) => {
    pointList.value = res.data;
  });
};

// 打开分站编辑
const open_editModal = () => {
  open_edit.value = true;
  open_detail.value = false;
  form_edit.value = subStationInfo.value;
};

// 获取安装地点下拉框数据
const getAddressInfo = () => {
  axios.post("/place/info/addressInfo", {}).then((res) => {
    addressInfoList.value = res.data.list;
  });
};

// 获取所在区域下拉数据
const getSearchTree = () => {
  axios.post("/area/info/searchTree", {}).then((res) => {
    searchTreeList.value = res.data;
  });
};

// 获取通道号
const getChannelNoList = () => {
  axios.get("/station/channelNoList").then((res) => {
    channelNoList.value = res.data;
  });
};

// 通道号改变事件
const channelNoChange = (val) => {
  channelNoList.value.forEach((item) => {
    if (val == item.id) {
      if (open_edit.value) {
        form_edit.value.channelName = item.name;
      } else {
        form_add.value.channelName = item.name;
      }
    }
  });
};

// 获取分站编号下拉数据
const getStationCodes = () => {
  axios.get("/station/stationCodes").then((res) => {
    ationNosList.value = res.data;
  });
};

// 获取分站类型下拉数据 /substation/type/search
const getSubstationType = () => {
  axios.post("/substation/type/search", {}).then((res) => {
    substationType.value = res.data.list;
  });
};

// 分站编号下拉事件
const stationTypeChange = (val) => {
  substationType.value.forEach((item) => {
    if (val == item.id) {
      if (open_edit.value) {
        form_edit.value.stationInNum = item.stationInNum;
        form_edit.value.stationModelName = item.stationModelName;
      } else {
        form_add.value.stationInNum = item.stationInNum;
        form_add.value.stationModelName = item.stationModelName;
      }
    }
  });
};

// 新增分站提交
const saveAdd = () => {
  formA.value.validate((valid) => {
    if (valid) {
      if (!form_add.value.isPlaceotherBreakfalg) {
        form_add.value.isPlaceotherBreakfalg = false;
      }
      if (!form_add.value.isGasDrainage) {
        form_add.value.isGasDrainage = false;
      }
      if (!form_add.value.isNetwork) {
        form_add.value.isNetwork = false;
      }
      if (!form_add.value.noOldprotocolSensor) {
        form_add.value.noOldprotocolSensor = false;
      }
      if (!form_add.value.continuation) {
        form_add.value.continuation = false;
      }
      if (!form_add.value.pointCutBroken) {
        form_add.value.pointCutBroken = false;
      }
      axios.post("/station/add", form_add.value).then((res) => {
        if (res.code == 200) {
          ElMessage.success("操作成功");
          open_add.value = false;
          getSubStation();
          activeName.value = "1";
        }
      });
    }
  });
};

// 编辑分站提交
const saveEdit = () => {
  formE.value.validate((valid) => {
    if (valid) {
      axios.post("/station/edit", form_edit.value).then((res) => {
        if (res.code == 200) {
          ElMessage.success("操作成功");
          open_edit.value = false;
          getSubStation();
          activeName.value = "1";
        }
      });
    }
  });
};

// 获取测点编号下拉
const getPointCodes = (code) => {
  axios.get(`/point/pointCodes?stationCode=${code}`).then((res) => {
    pointNoList.value = res.data;
  });
};

// 打开新增测点方法
const addPointFn = (n,item) => {
  if(n==1){
    showPointAdd2.value = true;
  }
  showPointAdd.value = item;
  form_add2.value.stationCode = subStationInfo.value.stationCode
};
// 打开新增测点弹窗
const open_addPoint = (n, code,pCode) => {
  open_add2.value = true;
  editpointId.value = null
  if(pCode){
    form_add2.value.pointCode = pCode
  }
  getPointCodes(code);
  showPointAdd.value = false;
  showPointAdd2.value = false;
  form_add2.value.pointType = n;
};

// 测点类型选择事件
const pointTypeChange = (val) => {
  form_add2.sensorId = undefined;
  if (val != 3) {
    expressionVoList.value = [];
  }
};

// 获取多参传感器下拉数据
const getSensorList = () => {
  axios.get("/point/sensor").then((res) => {
    let newc = [];
    res.data.forEach((item) => {
      item.label = item.name;
      item.value = item.name;
      if (item.sensors) {
        item.children = item.sensors;
        item.sensors.forEach((item1) => {
          item1.label = item1.sensorName;
          item1.value = item1.sensorId;
          if (item1.childIndexList) {
            newc = item1.childIndexList.map((item2) => {
              return {
                label: item2.childIndexName,
                value: item2.sensorId,
                data: item2,
              };
            });
            item1.children = newc;
          }
        });
      }
    });
    sensorIdList.value = res.data;
  });
};
// 获取多参传感器下拉数据
const getMultipleSensorList = () => {
  axios.post("/sensor/multiple/list", {}).then((res) => {
    mulsensorIdList.value = res.data.list;
  });
};

// 多参传感器名称下拉事件
const mulsensorIdChange = (val) => {
  mulsensorIdList.value.forEach((item) => {
    if (item.id == val) {
      needPlaceType.value = item.needPlaceType;
    }
  });
  if (val) {
    getlooksensorObj(val);
  }
};

// 查看传感器参数详情接口
const getlooksensorObj = (val) => {
  axios.get("/sensor/multiple/detail?id=" + val).then((res) => {
    looksensorObj.value = res.data;
    let arr = [];
    res.data.sensorList.forEach((item) => {
      item.baohanD = formatCloud(item.sensorId);
      item.obj = {
        hasUpGrandAlarm: false,
        hasDownGrandAlarm: false,
        hasMoreGrandAlarm: false,
        hasChangeGrandAlarm: false,
        alarmBasic: {
          alarmType: 0,
        },
        prealarmBasic: {
          hasPreAlarm: false,
          hasConstantPreAlarm: false,
        },
        upGrandalarmBasic: {
          grandalarmRate: {},
        },
        downGrandalarmBasic: {
          grandalarmRate: {},
        },
        cutArea: {},
        cutValueList: [
          {
            title: "断电配置",
            name: "1",
            cutStationList: [{}],
          },
        ],
      };
      if (item.childIndexName != null) {
        arr.push(item);
      }
    });
    mulactiveNamePoint.value = res.data.sensorList[0].sensorId;
    form_add2.value.multiplePointBranchList = arr;
  });
};
// 过滤器
const formatCloud = (str) => {
  return str.charAt(0);
};

// 普通传感器名称下拉事件
const chuangantreeChange = (data, node) => {
  let alarmtypeList = [
    {
      code: 0,
      name: "无",
    },
  ];
  let newdata = undefined;
  data = cascaderValue.value.getCheckedNodes()[0].data;
  if (!data.data) {
    newdata = data;
  } else {
    newdata = data.data;
  }
  if (newdata) {
    needPlaceType.value = newdata.needPlaceType;
    baohanunit.value = newdata.sensorUnit;
    if (newdata.needGrandalarm || newdata.needGrandalarm != null) {
      form_add2.value.needGrandalarm = newdata.needGrandalarm;
    }
    scaleDown.value = newdata.scaleDown;
    scaleUp.value = newdata.scaleUp;
    form_add2.value.alarmBasic.alarmType = newdata.alarmType;
    form_add2.value.alarmBasic.upAlarmValue = newdata.upAlarmValue;
    form_add2.value.alarmBasic.upRelieveValue = newdata.upRelieveValue;
    form_add2.value.alarmBasic.downAlarmValue = newdata.downAlarmValue;
    form_add2.value.alarmBasic.downRelieveValue = newdata.downRelieveValue;
    if (newdata.sensorId && newdata.sensorId != null) {
      baohanD.value = formatCloud(newdata.sensorId);
      if (baohanD.value == "D") {
        if (newdata.highShow != null) {
          alarmtypeList.push({
            code: 1,
            name: newdata.highShow,
          });
        }
        if (newdata.lowShow != null) {
          alarmtypeList.push({
            code: 2,
            name: newdata.lowShow,
          });
        }
        alarmBasicList.value = alarmtypeList;
        cutTypeList.value = alarmtypeList;
      } else {
        alarmBasicList.value = [
          {
            code: 0,
            name: "无",
          },
          {
            code: 1,
            name: "上限",
          },
          {
            code: 2,
            name: "下限",
          },
          {
            code: 3,
            name: "上下限",
          },
        ];
        cutTypeList.value = [
          {
            code: 1,
            name: "上限",
          },
          {
            code: 2,
            name: "下限",
          },
        ];
      }
    }
  }
};

// 获取模板名称列表
const getTemplateTree = () => {
  axios.get("/template/expression/getTemplateTree").then((res) => {
    templateTreeList.value = res.data;
  });
};

// 获取地点类型下拉数据
const getTypesInfo = () => {
  axios.post("/place/type/typesInfo", {}).then((res) => {
    placeTypeIdList.value = res.data.list;
  });
};

// 测点tab切换--关联电源/其他配置/操作日志
const ponitactiveNameTabClick = (type) => {
  activeNamePoint.value = type;
  if (type == 3) {
    getcontrolPortsList(datatreeCode.value);
  }
};

const getcontrolPortsList = (val) => {
  axios.post("/station/list", {}).then((res) => {
    stationPlaceNamList.value = res.data.list;
  });
};

// 预报警全部详情
const hasPreAlarmdescClick = () => {
  addModalhasPreAlarm.value = true;
  getalldescList(hasPreAlarmData.value.query);
  getalldescselList();
};
// 全部详情列表数据
const getalldescList = (data) => {
  axios.post("/point/preAlarmList", data).then((res) => {
    hasPreAlarmData.value.tabledata = res.data.list;
    hasConstantPreAlarmData.value.tabledata = res.data.list;
    hasPreAlarmData.value.total = res.data.total;
    hasConstantPreAlarmData.value.total = res.data.total;
  });
};
// 全部详情下拉接口
const getalldescselList = () => {
  axios.post("/point/queryAllName", {}).then((res) => {
    hasPreAlarmData.value.selList = res.data;
    hasConstantPreAlarmData.value.selList = res.data;
  });
};
// 恒值预报警全部详情
const hasConstantPreAlarmdescClick = () => {
  addModalhasConstantPreAlarm.value = true;
  getalldescList(hasConstantPreAlarmData.value.query);
  getalldescselList();
};
// 上限分级报警开关
const hasUpGrandAlarmChange = (val) => {
  radio1.value = "上限分级报警";
};
const hasDownGrandAlarmChange = (val) => {
  radio1.value = "下限分级报警";
  if (!val) {
    radio1.value = "上限分级报警";
  }
};

const putongAddClick = () => {
  if (form_add2.value.pointType == 1) {
    if (form_add2.value.cutValueList == null) {
      form_add2.value.cutValueList = [];
    }
    form_add2.value.cutValueList.push({
      title: "断电配置",
      name: 1,
      cutStationList: [{}],
    });
  }
  if (form_add2.value.pointType == 2) {
    form_add2.value.multiplePointBranchList.forEach((item) => {
      if (mulactiveNamePoint.value == item.sensorId) {
        if (item.obj.cutValueList != null) {
          item.obj.cutValueList.push({
            title: "断电配置",
            name: 1,
            cutStationList: [{}],
          });
        } else {
          item.obj.cutValueList = [];
          item.obj.cutValueList.push({
            title: "断电配置",
            name: 1,
            cutStationList: [{}],
          });
        }
      }
    });
  }
};

const removeTab = (val) => {
  if (form_add2.value.pointType == 1) {
    if (val == 0) {
    } else {
      form_add2.value.cutValueList.splice(val, 1);
    }
  }
  if (form_add2.value.pointType == 2) {
    form_add2.value.multiplePointBranchList.forEach((item) => {
      if (mulactiveNamePoint.value == item.sensorId) {
        item.obj.cutValueList.splice(val, 1);
      }
    });
  }
};

const addcutdeviceClick = () => {
  if (form_add2.value.pointType == 1) {
    form_add2.value.cutValueList.forEach((item, index) => {
      if (ordintranValue.value == index) {
        item.cutStationList.push({});
      }
    });
  }
  if (form_add2.value.pointType == 2) {
    form_add2.value.multiplePointBranchList.forEach((item) => {
      if (mulactiveNamePoint.value == item.sensorId) {
        item.obj.cutValueList.forEach((item, index) => {
          if (ordintranValue.value == index) {
            item.cutStationList.push({});
          }
        });
      }
    });
  }
};

// el-collapse-item阻止冒泡
const stopCollapse = (e) => {
  return e.stopPropagation();
};

const fenzhankaichuList = (controlPort) => {
  return new Promise((resolve, reject) => {
    controlPortsList(controlPort).then((res) => {
      resolve(res.data);
    });
  });
};

// 断电-配置列表
async function getcutconfigId(e, val) {
  let arr = await fenzhankaichuList(e);
  if (form_add2.value.pointType == 1) {
    if (collapseAtive.value == val) {
      form_add2.value.cutValueList.forEach((item1, index) => {
        if (ordintranValue.value == index) {
          if (!item1.cutStationList) {
            item1.cutStationList = [{}];
          }
          item1.cutStationList[val].controlPortList = arr;
        }
      });
    }
  }
  if (form_add2.value.pointType == 2) {
    form_add2.value.multiplePointBranchList.forEach((item0) => {
      if (mulactiveNamePoint.value == item0.sensorId) {
        if (collapseAtive.value == val) {
          item0.obj.cutValueList.forEach((item1, index) => {
            if (ordintranValue.value == index) {
              if (!item1.cutStationList) {
                item1.cutStationList = [{}];
              }
              item1.cutStationList[val].controlPortList = arr;
            }
          });
        }
      }
    });
  }
}

async function controlPortChange(e, val) {
  collapseAtive.value = val;
  cutconfigId.value = e;
  if (form_add2.value.pointType == 1) {
    if (collapseAtive.value == val) {
      await stationPlaceNamList.value.forEach((item) => {
        if (e == item.stationCode) {
          form_add2.value.cutValueList.forEach((item1, index) => {
            if (ordintranValue.value == index) {
              item1.cutStationList[val].stationCode = item.stationCode;
              item1.cutStationList[val].stationPlaceName =
                item.stationPlaceName;
              getcutconfigId(e, val);
            }
          });
        }
      });
    }
  }
  if (form_add2.value.pointType == 2) {
    await form_add2.value.multiplePointBranchList.forEach((item0) => {
      if (mulactiveNamePoint.value == item0.sensorId) {
        if (collapseAtive == val) {
          stationPlaceNamList.value.forEach((item) => {
            if (e == item.stationCode) {
              item0.obj.cutValueList.forEach((item1, index) => {
                if (ordintranValue.value == index) {
                  item1.cutStationList[val].stationCode = item.stationCode;
                  item1.cutStationList[val].stationPlaceName =
                    item.stationPlaceName;
                  getcutconfigId(e, val);
                }
              });
            }
          });
        }
      }
    });
  }
  cutconfigIdTypestation.value = e;
}

// 表格禁用状态
const checkboxConfig = reactive({
  checkMethod: ({ row }) => {
    return row.controlPortType != null;
  },
});

// 表格选中事件
const selectChangeEvent = (e, val) => {
  e.records.forEach((item) => {
    item.selected = true;
  });
};

// 测点普通断电-配置按钮
const pointputongConfigClick = (row) => {
  addModalconfig.value = true;
  formDataconfig.value = {};
  cutconfigIdTypereq.value = row.controlPortType;
  formDataconfig.value.controlPort = row.controlPort;
  formDataconfig.value.stationCode = cutconfigIdTypestation.value;
};

// 开出口-控制设备下拉事件
const controlPortTypeChange = (val) => {
  controlPortTypeList.value.forEach((item) => {
    if (val == item.code) {
      formData2.value.controlPortTypeName = item.name;
      form_add.value.controlPortTypeName = item.name;
    }
  });
  if (val == 2) {
    formData2.value.feedPointId = undefined;
    form_add.value.feedPointId = undefined;
  }
};

// 开出口馈电测点下拉事件
const feedPointIdChange = (val) => {
  feedPointIdList.value.forEach((item) => {
    if (val == item.pointId) {
      formData2.value.pointPlaceName = item.pointPlaceName;
      form_add.value.pointPlaceName = item.pointPlaceName;
    }
  });
};

// 配置确定按钮
const onSubmitConfigClick = () => {
  proxy.$refs["formRefconfig"].validate((valid) => {
    if (valid) {
      if (cutconfigIdTypereq.value != null) {
        axios.post("/controlPort/edit", formDataconfig.value).then((res) => {
          proxy.$modal.msgSuccess(res.msg);
          getcutconfigId(cutconfigId.value);
          addModalconfig.value = false;
        });
      } else {
        axios.post("/controlPort/add", formDataconfig.value).then((res) => {
          proxy.$modal.msgSuccess(res.msg);
          getcutconfigId(cutconfigId.value);
          addModalconfig.value = false;
        });
      }
    }
  });
};

// 配置取消按钮
const cancelConfigClick = () => {
  addModalconfig.value = false;
};

// 获取区域信息
getinfosearchAll().then((res) => {
  infosearchAllList.value = res.data.list;
});

const chuangantreeChange1 = (val) => {
  let arr = findParentArr(val, hasPreAlarmData.value.selList)
  hasPreAlarmData.value.query.condition = arr.toString().replace(/,/g, '')
}

const chuangantreeChange2 = (val) => {
    let arr = findParentArr(val, hasPreAlarmData.value.selList)
    hasConstantPreAlarmData.value.query.condition = arr.toString().replace(/,/g, '')
}

// 获取父级id
const findParentArr = (targetId, mock) => {
    const ids = []
    function getParent(sources) {
        if (Array.isArray(sources)) {
            return sources.find(elm => {
                let rs = getParent(elm)
                if (rs) {
                    ids.push(elm.code)
                }
                return rs
            })
        }
        if (sources.code === targetId) {
            return true
        }
        if (Array.isArray(sources.children)) {
            return getParent(sources.children)
        }
    }
    getParent(mock)
    ids.reverse()
    return ids
}

// 全部详情查询
const yinyonClick = () => {
  getalldescList(hasPreAlarmData.value.query)
}

// 重置全部详情
const cancelyinyonClick = () => {
    hasPreAlarmData.value.condition = ''
    hasPreAlarmData.value.query.condition = ''
    getalldescList(hasPreAlarmData.value.query)
}

const yubaojingConfigClick = (row) => {
    baohanD.value = formatCloud(row.deviceId)
    form_add2.value.prealarmBasic.hasPreAlarm = true
    form_add2.value.prealarmBasic.upPrealarmValue = row.upPrealarmValue
    form_add2.value.prealarmBasic.downPrealarmValue = row.downPrealarmValue
    form_add2.value.prealarmBasic.prealarmTimeout = row.prealarmTimeout
    addModalhasPreAlarm.value = false
}

const hasPreAlarmpagechange = () => {
        getalldescList(hasPreAlarmData.value.query)
}

// 全部详情查询
const yinyonClick1 = () => {
    getalldescList(hasConstantPreAlarmData.value.query)
}
// 重置全部详情
const cancelyinyonClick1 = () => {
    hasConstantPreAlarmData.value.condition = ''
    hasConstantPreAlarmData.value.query.condition = ''
    getalldescList(hasConstantPreAlarmData.value.query)
}

const hengbaojingConfigClick = (row) => {
    baohanD.value = formatCloud(row.deviceId)
    form_add2.value.prealarmBasic.hasConstantPreAlarm = true
    form_add2.value.prealarmBasic.constantTime = row.constantTime
    addModalhasConstantPreAlarm.value = false
}


// 新增测点提交
const  addpointClick = () => {
        proxy.$refs["formRef1"].validate(valid => {
            if (valid) {
                if (form_add2.value.pointType == 1) {
                    let newarr = []
                    newarr = form_add2.value.cutValueList
                    if (newarr != null) {
                        if (newarr.length > 0) {
                            newarr.forEach(item => {
                                item.cutStationList.forEach(item1 => {
                                    let arrr = []
                                    if (item1.controlPortList && item1.controlPortList.length >
                                        0) {
                                        item1.controlPortList.forEach(item2 => {
                                            if (item2.selected == true) {
                                                arrr.push(item2)
                                            }
                                        })
                                        item1.controlPortList = arrr
                                    }
                                })
                            })
                        }
                    }
                    // form_add2.value.cutValueList = newarr
                    form_add2.value.pointId = editpointId.value

                    if (editpointId.value) {
                        axios.post(ponitEditUrl.value, form_add2.value).then(res => {
                            if (res.code == 200) {
                                proxy.$modal.msgSuccess(res.msg);
                                // getsider()
                                editpointId.value = undefined
                                open_add2.value = false
                                getPointList(subStationInfo.value.stationCode)
                            }
                        })
                    } else {
                        axios.post(ponitAddUrl.value, form_add2.value).then(res => {
                            if (res.code == 200) {
                                proxy.$modal.msgSuccess(res.msg);
                                // getsider()
                                // editpointId.value = undefined
                                form_add2.value.cutValueList = [{
                                    title: '断电配置',
                                    name: 1,
                                    cutStationList: [{}]
                                }]
                                open_add2.value = false
                                getPointList(subStationInfo.value.stationCode)
                                getponitdetailData(form_add2.value.stationCode + formatCloud(form_add2.value.sensorId) + form_add2.value.pointCode)
                            }
                        })
                    }
                }
                if (form_add2.value.pointType == 2) {
                    let newarr = form_add2.value.multiplePointBranchList
                    let arr = []
                    newarr.forEach(item => {
                        // item.obj.sensorId = item.sensorId
                        delete item.obj
                    })
                    arr = newarr
                    form_add2.value = delObj(form_add2.value,
                        ['hasUpGrandAlarm', 'hasDownGrandAlarm',
                            'hasMoreGrandAlarm', 'hasChangeGrandAlarm',
                            'alarmBasic', 'prealarmBasic', 'upGrandalarmBasic',
                            'downGrandalarmBasic', 'cutArea', 'cutValueList'
                        ])

                    form_add2.value.multiplePointBranchList = arr
                    form_add2.value.pointId = editpointId.value

                    if (editpointId.value) {
                        axios.post('/point/editMultiple', form_add2.value).then(res => {
                            if (res.code == 200) {
                                proxy.$modal.msgSuccess(res.msg);
                                open_add2.value = false
                                getPointList(subStationInfo.value.stationCode)
                                getponitdetailData(form_add2.value.stationCode + 'M')
                            }
                        })
                    } else {
                        axios.post('/point/addMultiple', form_add2.value).then(res => {
                            if (res.code == 200) {
                                proxy.$modal.msgSuccess(res.msg);
                                open_add2.value = false
                                getPointList(subStationInfo.value.stationCode)
                                getponitdetailData(form_add2.value.stationCode + 'M' + form_add2.value
                                    .pointCode)
                            }
                        })
                    }
                }
                if (form_add2.value.pointType == 3) {
                    let newarr = []
                    newarr = form_add2.value.cutValueList
                    if (newarr != null) {
                        if (newarr.length > 0) {
                            newarr.forEach(item => {
                                item.cutStationList.forEach(item1 => {
                                    let arrr = []
                                    if (item1.controlPortList && item1.controlPortList.length >
                                        0) {
                                        item1.controlPortList.forEach(item2 => {
                                            if (item2.selected == true) {
                                                arrr.push(item2)
                                            }
                                        })
                                        item1.controlPortList = arrr
                                    }
                                })
                            })
                        }
                    }
                    let arrr = []
                    // form_add2.value.cutValueList = newarr
                    expressionVoList.value.forEach(item => {
                        if (item.obj) {
                            arrr.push(item.obj.code)
                            console.log(arrr, 'item.codeList')
                            // arrr= item.codeList.map(item1=>{
                            //     return item1.code
                            // })
                        }
                    })
                    form_add2.value.pointIdList = arrr
                    form_add2.value.pointId = editpointId.value
                    if (editpointId.value) {
                        axios.post('point/editVirtual', form_add2.value).then(res => {
                            if (res.code == 200) {
                                proxy.$modal.msgSuccess(res.msg);
                                // getsider()
                                editpointId.value = undefined
                                open_add2.value = false
                                getPointList(subStationInfo.value.stationCode)
                            }
                        })
                    } else {
                        axios.post('point/addVirtual', form_add2.value).then(res => {
                            if (res.code == 200) {
                                proxy.$modal.msgSuccess(res.msg);
                                // getsider()
                                // editpointId.value = undefined
                                form_add2.value.cutValueList = [{
                                    title: '断电配置',
                                    name: 1,
                                    cutStationList: [{}]
                                }]
                                open_add2.value = false
                                getPointList(subStationInfo.value.stationCode)
                                getponitdetailData(form_add2.value.stationCode + formatCloud(form_add2.value.sensorId) + form_add2.value.pointCode)
                            }
                        })
                    }
                }
            }

        })
        // getSelList()
}

//获取普通测点详情数据
const getponitdetailData = (id, num) => {
        if (num) {
            activeNamePoint.value = num
        } else {
            activeNamePoint.value = 1
        }
        let ponitdetailUrl2 = ponitdetailUrl.value
        if (id.includes("M")) {
            ponitdetailUrl2 = '/point/detailMultiple'
        } else if (id.includes("V")) {
            ponitdetailUrl2 = 'point/detailVirtual'
        } else {
            ponitdetailUrl2 = ponitdetailUrl.value
        }
        let alarmtypeList = [{
            code: 0,
            name: '无'
        }]
        axios.get(ponitdetailUrl2 + `?pointId=` + id).then(res => {
            form_add2.value = res.data
            needPlaceType.value = form_add2.value.needPlaceType
            curTreeId.value = form_add2.value.pointId
            if (id.includes("M")) {
                form_add2.value.sensorId = Number(form_add2.value.sensorId)
                axios.get('/sensor/multiple/detail?id=' + form_add2.value.sensorId).then(res => {
                    looksensorObj.value = res.data
                })
                let arr1 = form_add2.value.multiplePointBranchList
                mulactiveNamePoint.value = arr1[0].sensorId
                arr1.forEach(
                    item => {
                        item.baohanD = formatCloud(item.sensorId)
                        if (item.cutValueList != null && item.cutValueList.length > 0) {
                            item.cutValueList.forEach((item11, index11) => {
                                item11.title = '断电配置'
                                item11.name = (Number(index11) + 1)
                                if (item11.cutStationList) {
                                    if (item11.cutStationList.length > 0) {
                                        item11.cutStationList.forEach(item3 => {
                                            if (item3.controlPortList) {
                                                if (item3.controlPortList.length > 0) {
                                                    let rrrr = []
                                                    item3.controlPortList.map(item4 => {
                                                        if (item4.selected ==
                                                            true) {
                                                            rrrr.push(item4)
                                                        }
                                                        return rrrr
                                                    })
                                                    item3.controlPortList = rrrr
                                                }
                                            }
                                        })
                                    }
                                }
                            })
                        }
                        if (item.cutArea != null) {
                            let areaIdList = item.cutArea.areaIdList.map(item3 => {
                                return Number(item3)
                            })
                            item.cutArea.areaIdList = areaIdList
                        }else{
                            item.cutArea={
                                areaIdList:undefined,
                                cutValue:undefined,
                                resumeValue:undefined
                            }
                        }
                        item.obj = item
                        // return item
                    })
                    console.log(arr1,'arr1');
                form_add2.value.multiplePointBranchList = arr1
            } else {
                if (form_add2.value.pointType == 3) {
                    getbiaodashiList(form_add2.value.templateId)
                    if (form_add2.value.pointId.includes('D')) {
                        baohanD.value = 'D'
                    }
                } else {
                    baohanD.value = formatCloud(form_add2.value.sensorId)
                }

                if (form_add2.value.cutArea && form_add2.value.cutArea != null) {
                    if (form_add2.value.cutArea.areaIdList) {
                        if (form_add2.value.cutArea.areaIdList.length > 0) {
                            form_add2.value.cutArea.areaIdList = form_add2.value.cutArea.areaIdList.map(
                                item => {
                                    return Number(item)
                                })
                        }
                    }
                } else {
                    form_add2.value.cutArea = null
                }
                if (baohanD.value == 'D') {
                    if (form_add2.value.highShow != null) {
                        alarmtypeList.push({
                            code: 1,
                            name: form_add2.value.highShow
                        })
                    }
                    if (form_add2.value.lowShow != null) {
                        alarmtypeList.push({
                            code: 2,
                            name: form_add2.value.lowShow
                        })
                    }
                    alarmBasicList.value = alarmtypeList
                } else {
                    alarmBasicList.value = [{
                        code: 0,
                        name: '无'
                    }, {
                        code: 1,
                        name: '上限'
                    }, {
                        code: 2,
                        name: '下限'
                    }, {
                        code: 3,
                        name: '上下限'
                    }]
                }
                if (form_add2.value.upGrandalarmBasic == null) {
                    form_add2.value.upGrandalarmBasic = {
                        grandalarmRate: {
                            thresholdValue: '',
                            rateCycle: ''
                        }
                    }
                } else {
                    if (form_add2.value.upGrandalarmBasic.grandalarmRate == null) {
                        form_add2.value.upGrandalarmBasic.grandalarmRate = {
                            thresholdValue: ''
                        }
                        form_add2.value.upGrandalarmBasic.grandalarmRate = {
                            rateCycle: ''
                        }
                    }
                }
                if (form_add2.value.downGrandalarmBasic != null) {
                    if (form_add2.value.downGrandalarmBasic.grandalarmRate == null) {
                        form_add2.value.downGrandalarmBasic.grandalarmRate = {
                            thresholdValue: ''
                        }
                        form_add2.value.downGrandalarmBasic.grandalarmRate = {
                            rateCycle: ''
                        }
                    }
                } else {
                    form_add2.value.downGrandalarmBasic = {
                        grandalarmRate: {
                            thresholdValue: '',
                            rateCycle: ''
                        }
                    }
                }
                if (form_add2.value.hasUpGrandAlarm) {
                    radio1.value = '上限分级报警'
                }
                if (form_add2.value.cutValueList != null) {
                    if (form_add2.value.cutValueList.length > 0) {
                        if (cutValueListyou.value == true) {
                            let arr = []
                            form_add2.value.cutValueList.forEach((item, index) => {
                                item.cutStationList.forEach(item2 => {
                                    item2.controlPortList.forEach(item3 => {
                                        if (item3.selected == true) {
                                            item3.stationCode = item2.stationCode
                                            item3.stationPlaceName = item2
                                                .stationPlaceName
                                            arr.push(item3)
                                        }
                                    })
                                    item2.controlPortList = arr
                                    console.log(item2.controlPortList, 'arr');
                                })
                            })
                        } else {
                            form_add2.value.cutValueList.forEach((item, index) => {
                                item.title = '断电配置'
                                item.name = (index + 1)
                            })
                        }
                    }
                }
            }
        })
}

const getbiaodashiList = (id) => {
    let arr = []
    axios.get('/template/expression/getExpressionVo/' + id).then(res => {
        let expressionList = res.data.expressionList.map(item => {
            return {
                value: item,
                obj: undefined
            }
        })
        for (let i = 0; i < expressionList.length; i++) {
            Object.keys(res.data.templateNodeMap).map(async item => {
                console.log(expressionList, 'expressionList');
                if (expressionList[i].value == item) {
                    if (form_add2.value.virtualPointMap) {
                        if (form_add2.value.virtualPointMap != null) {
                            expressionList[i].value = form_add2.value.virtualPointMap[item]
                                .pointName
                            expressionList[i].obj = form_add2.value.virtualPointMap[item]
                            expressionList[i].obj.code = form_add2.value.virtualPointMap[item]
                                .sensorId
                            let codeList = await getpointIdsListData(form_add2.value
                                .virtualPointMap[item]
                                .sensorId)
                            expressionList[i].obj.codeList = codeList
                        }
                    } else {
                        expressionList[i].value = null
                        expressionList[i].obj = res.data.templateNodeMap[item]
                        let codeList = await getpointIdsListData(res.data.templateNodeMap[item]
                            .code)
                        expressionList[i].obj.codeList = codeList
                    }
                }
            })
        }
        expressionVoList.value = expressionList
    })
}

function getpointIdsListData(data) {
    return new Promise((resolve, reject) => {
        getPointIdsList({
            code: data
        }).then(res => {
            resolve(res.data)
        })
    })
}

// 弹窗关闭时执行
const closeMoadl = () => {
  form_add2.value = {
    gasDrainageGroupno: 1,
    hasUpGrandAlarm: false,
    hasDownGrandAlarm: false,
    hasMoreGrandAlarm: false,
    hasChangeGrandAlarm: false,
    calibration: {
      isCalibration:false
    },
    alarmBasic: {},
    prealarmBasic: {},
    upGrandalarmBasic: {
      grandalarmRate: {},
    },
    downGrandalarmBasic: {
      grandalarmRate: {},
    },
    cutArea: {},
    cutValueList: [
      {
        title: "断电配置",
        name: "1",
        cutStationList: [
          {
            controlPort: "",
            pointPlaceName: "",
          },
        ],
      },
    ],
  }
}

// 打开测点编辑弹窗
const openPointEdit = (item) =>{
  console.log((item.pointId).slice(0,6));
  open_add2.value = true
  editpointId.value = item.pointId
  if(item.pointType == 1){
    getponitdetailData(item.pointId)
  }else if(item.pointType == 2){
    getponitdetailData((item.pointId).slice(0,6))
  }else if(item.pointType == 3){
    getponitdetailData(item.pointId)
  }
}
// 打开测点编辑弹窗
const openPointEdit2 = (item,n) =>{
  open_add2.value = true
  editpointId.value = item.pointId
  if(item.pointType == 1){
    getponitdetailData(item.pointId,n)
  }else if(item.pointType == 2){
    getponitdetailData((item.pointId).slice(0,6))
    if (n) {
        activeNamePoint.value = n
    } else {
        activeNamePoint.value = 1
    }
  }else if(item.pointType == 3){
    getponitdetailData(item.pointId)
    if (n) {
        activeNamePoint.value = n
    } else {
        activeNamePoint.value = 1
    }
  }
}

// 打开新增开出口弹窗
const openControlPorts = (item) => {
  open_port.value = true
  form_add.value.stationCode = subStationInfo.value.stationCode
  if(item.controlPortType){
    getopendetailData(item.controlPort,subStationInfo.value.stationCode)
    controlSourceData.value.query.controlPointIds = item.pointId
    getcontrolSourceList()
  }else{
    controlPortTypeId.value = null
    form_add.value.controlPort = item.controlPort
  }
}

// 获取开出口详情
const getopendetailData = (id, stationCode) => {
    axios.get('/controlPort/detail?controlPort=' + id + '&stationCode=' + stationCode).then(res => {
      form_add.value = res.data
      controlPortTypeId.value = true
    })
}

// 新增开出口提交
const addopenClick = () => {
  proxy.$refs["formRef2"].validate(valid => {
      if (valid) {
          if (controlPortTypeId.value != null) {
              axios.post('/controlPort/edit', form_add.value).then(res => {
                  if (res.code == 200) {
                      proxy.$modal.msgSuccess(res.msg);
                      open_port.value = false
                      getControlPorts(subStationInfo.value.stationCode);
                  }
              })
          } else {
              axios.post('/controlPort/add', form_add.value).then(res => {
                  if (res.code == 200) {
                      proxy.$modal.msgSuccess(res.msg);
                      open_port.value = false
                      getControlPorts(subStationInfo.value.stationCode);
                  }
              })
          }
      }
  })
}

// 控制源列表
const getcontrolSourceList = () => {
  axios.post('/point/controlList', controlSourceData.value.query).then(res => {
      controlSourceData.value.tabledata = res.data.list
      controlSourceData.value.total = res.data.total
  })
}

// 开出口安装地点下拉事件
const pointPlaceIdopenChange = (val) => {
    addressInfoList.value.forEach(item => {
        if (val == item.id) {
          form_add.value.pointPlaceName = item.placeName
        }
    })
}

// 获取所有通道编号
const getAllchannelNO = () => {
  axios.get('/station/channelNoList').then(res =>{
    console.log(res);
    channelList.value = res.data
  })
}

// 获取通道下分站
const getchannelInfo = (i,id) =>{
  if(sIndex.value == i){
    sIndex.value = null
  }else{
    sIndex.value = i
    axios.post(`/station/containNetDetail`,{channelNo:id}).then(res => {
      console.log(res);
      channelInfo.value = res.data.selectedNetworkList
    })
  } 
}

// 打开更换通道弹窗
const openupDateChannel = () =>{
  eidt_channel.value = true
}

// 选择下属分站
const chooseStation = (item,index) =>{
  let arrIndex = stationBasicDtoList.value.indexOf(item)
  console.log(arrIndex);
  if(arrIndex > -1){
    stationBasicDtoList.value.splice(arrIndex,1)
  }else{
    stationBasicDtoList.value.push(item)
  }
  form_channel.value.stationBasicDtoList = stationBasicDtoList.value
}

// 确认更换通道
const confirmReplace = () =>{
  axios.post('/station/modifyNetDetail',form_channel.value).then(res => {
    if(res.code == 200){
      ElMessage.success('操作成功')
      stationBasicDtoList.value = []
      form_channel.value = {}
      eidt_channel.value = false
      sIndex.value = null
    }
  })
}

function delObj(obj, keys) {
    keys.map(function (key) {
        delete obj[key]
    })
    return obj
}


onMounted(() => {
  getSubStation();
  getAreaList();
  getDevtList();
  getAddressInfo();
  getSearchTree();
  getChannelNoList();
  getStationCodes();
  getSubstationType();
  getSensorList();
  getMultipleSensorList();
  getTemplateTree();
  getTypesInfo();
  getFeedList()
  getAllchannelNO()
});
</script>
<style lang="scss" scoped>
.nodata2 {
  margin: auto;
  width: 200px;
  height: 100%;
  font-size: 14px;
  color: rgba(182, 191, 204, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  img{
    width: 300px;
  }
}


.yichang{
  background-color: #f4efe7 !important;
}
.yichang:hover{
  background-color: #f3ebde !important;
}
.baojing{
  background-color: #f5eaea !important;
}
.baojing:hover{
  background-color: #f5e4e4 !important;
}
.huise{
  background-color: rgba(239, 239, 240,0.4) !important;
}
.huise:hover{
  background-color: #e9ebec !important;
}

.select{
  background-color: #f0f7ff !important;
  border:1px solid rgba(64, 158, 255, 1);
}

.active {
  color: rgba(64, 158, 255, 1);
}
.tabs_active {
  background-color: #e8f1ff;
  color: rgba(64, 158, 255, 1);
}

.head_box{
  display: flex;
  align-items: center;
  img{
    margin-right: 8px;
  }
}

.eidt_channelBox{
  height: 100%;
  position: relative;
  .one{
    margin: 0 0 32px 0;
    .title{
      margin: 0 0 12px 0;
      font-size: 14px;
      color:rgba(62, 70, 79, 0.8)
    }
  }
  .footer_btn{
    position: absolute;
    right: 0;
    bottom:0;
  }
}

.activeNameTab {
        color: #333;
        font-size: 14px;
        font-weight: 700;
        padding: 0 10px;

        .span1,
        .span {
            position: relative;
            margin-right: 20px;
            cursor: pointer;

            &.span1 {
                margin-right: 0;
                padding: 8px 20px;
                border-radius: 4px 4px 0 0;
            }

            &.active {
                position: relative;

                &::before {
                    position: absolute;
                    content: '';
                    left: 50%;
                    bottom: -10px;
                    width: 56px;
                    height: 2px;
                    background-color: rgba(64, 158, 255, 1);
                    transform: translate(-50%, -50%);

                }
            }

            &.active1 {
                border-radius: 4px 4px, 0px, 0px;
                background: linear-gradient(180deg, rgba(91, 109, 128, 0.12) 0%, rgba(91, 109, 128, 0.04) 100%);
            }
        }
}

.desc_box {
    padding: 10px;
    background: rgba(91, 109, 128, 0.04);
    margin: 10px 10px 0;
}

::v-deep .putongClass .el-tabs__item {
    width: 130px;
    height: 34px;
    .el-icon {
        position: relative;
        height: 20px !important;
        width: 20px !important;
        &:after {
            position: absolute;
            content: url('@/assets/icons/svg/delkong.svg');
            top: 2px;
            left: 2px;
        }
    }
    .el-icon svg {
        display: none;
    }
}


::v-deep .vxe-modal--wrapper .vxe-modal--header{
    padding: 0 !important;
    height: 40px !important;
    background: rgba(64, 158, 255, 0.4) !important;
    border-bottom: none;
}


.demo-tabs {
  .custom-tabs-label {
    display: flex;
    align-items: center;
  }
  .tabs_box {
    height: 220px;
  }
  .one {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    .data_row {
      display: flex;
      justify-content: space-between;
    }
    .data_item {
      width: 154px;
      height: 36px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      color: rgba(62, 70, 79, 1);
      font-size: 14px;
      .item_title {
        color: rgba(62, 70, 79, 0.6);
      }
    }
  }
  .two {
    display: flex;
    justify-content: space-between;
    .items {
      font-size: 14px;
      color: rgba(62, 70, 79, 0.8);
    }
  }
  .three {
    height: 300px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    .three_header {
      display: flex;
      justify-content: space-between;
      color: rgba(62, 70, 79, 0.8);
      font-size: 14px;
      .header_item {
        display: flex;
        align-items: center;
      }
      .btns {
        width: 140px;
        display: flex;
        justify-content: space-between;
      }
    }
    .table {
      margin-top: 12px;
    }
  }
}
.demo-tabs2 {
  .custom-tabs-label {
    display: flex;
    align-items: center;
  }
  .tabs_box {
    height: 220px;
  }
  .one {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    .header {
      display: flex;
      justify-content: space-evenly;
      color: rgba(62, 70, 79, 0.8);
      font-size: 14px;
      .header_item {
        display: flex;
        align-items: center;
      }
      .btns {
        width: 140px;
        display: flex;
        justify-content: space-between;
      }
      .addbtn {
        display: flex;
        align-items: center;
        color: rgba(64, 158, 255, 1);
      }
    }
  }
  .two {
    display: flex;
    justify-content: space-between;
    .items {
      font-size: 14px;
      color: rgba(62, 70, 79, 0.8);
    }
  }
  .three {
    height: 300px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    .three_header {
      display: flex;
      justify-content: space-between;
      color: rgba(62, 70, 79, 0.8);
      font-size: 14px;
      .header_item {
        display: flex;
        align-items: center;
      }
      .btns {
        width: 140px;
        display: flex;
        justify-content: space-between;
      }
    }
    .table {
      margin-top: 12px;
    }
  }
}

// 分站详情
::v-deep .detail {
  width: 912px !important;
  // height: 100%;
  .detail_box {
    width: 100%;
    height: 100%;
    .basic_info {
      padding: 16px;
      height: 285px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      .location {
        display: flex;
        align-items: center;
        font-size: 14px;
        font-weight: 700;
        color: rgba(62, 70, 79, 1);
      }
      .line {
        height: 1px;
        background-color: rgba(91, 109, 128, 0.3);
      }
      .info_data {
        height: 204px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        .img_box {
          width: 200px;
          height: 142px;
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          align-items: center;
          font-size: 14px;
          .name {
            font-weight: 700;
          }
          img {
            width: 51px;
            height: 66px;
          }
        }
        .data_box {
          width: 632px;
          height: 100%;
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          .data_row {
            display: flex;
          }
          .data_item {
            height: 36px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            color: rgba(62, 70, 79, 1);
            font-size: 14px;
            .item_title {
              color: rgba(62, 70, 79, 0.6);
            }
          }
        }
      }
      .others {
        height: 275px;
      }
    }
  }
  .footer_btns {
    display: flex;
    justify-content: space-between;
  }
}
// 分站编辑
::v-deep .edit {
  width: 912px !important;
  // height: 100%;
  .edit_box {
    width: 100%;
    height: 100%;
    .basic_info {
      padding: 16px;
      height: 380px;
    }
    .basic_info2 {
      padding: 16px;
    }
    .others {
      height: calc(100% - 380px);
    }
  }
  .footer_btns {
    display: flex;
    justify-content: space-between;
  }
}
::v-deep .temp {
  width: 1000px !important;
  // height: 100%;
  .temp_box {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    .tabs {
      width: 160px;
      height: 100%;
      .items {
        padding: 11px;
        height: 40px;
        font-size: 14px;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: space-between;
        .num {
          width: 20px;
          height: 20px;
          border-radius: 20px;
          font-size: 12px;
          font-weight: normal;
          background-color: rgba(64, 158, 255, 1);
          color: #fff;
          display: flex;
          align-items: center;
          justify-content: center;
        }
      }
    }
    .temp_list {
      width: 784px;
      height: 100%;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      .search {
        display: flex;
        justify-content: space-between;
        .add_btn {
          padding: 4px 10px;
          width: 72px;
          height: 32px;
          font-size: 14px;
          color: rgba(64, 158, 255, 1);
          display: flex;
          align-items: center;
          img {
            width: 20px;
            height: 20px;
            margin-right: 4px;
          }
        }
      }
      .list {
        height: calc(100% - 48px);
        display: flex;
        flex-wrap: wrap;
        align-content: flex-start;
        justify-content: space-between;
        .tag {
          width: 40px;
          height: 20px;
          background-color: #c4e9f6;
          color: rgba(10, 170, 220, 1);
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 12px;
        }
        .items1 {
          padding: 16px;
          width: 384px;
          height: 148px;
          background-color: rgba(10, 170, 220, 0.1);
          font-size: 14px;
          border-radius: 4px;
          display: flex;
          align-items: center;
          justify-content: space-between;
          flex-direction: column;
          .top {
            width: 100%;
            display: flex;
            justify-content: space-between;
            .name {
              font-weight: 700;
              width: 232px;
            }
            .btns {
              color: rgba(64, 158, 255, 1);
            }
          }
          .bottom {
            padding: 16px;
            width: 100%;
            height: 80px;
            background-color: #fff;
            border-radius: 4px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            .b_box {
              display: flex;
              .one {
                margin-right: 8px;
                width: 60px;
                font-size: 14px;
                color: rgba(62, 70, 79, 0.6);
              }
              .two {
                span:not(:last-child) {
                  margin-right: 10px;
                }
              }
              .three {
                color: rgba(64, 158, 255, 1);
                display: flex;
                align-items: center;
              }
            }
          }
        }
        .items2 {
          padding: 16px;
          width: 384px;
          height: 238px;
          background-color: rgba(10, 170, 220, 0.1);
          font-size: 14px;
          border-radius: 4px;
          .top {
            width: 100%;
            display: flex;
            justify-content: space-between;
            .name {
              font-weight: 700;
              width: 232px;
            }
            .btns {
              color: rgba(64, 158, 255, 1);
            }
            .tag2 {
              color: rgba(47, 173, 104, 1);
              background-color: #d1eddd;
            }
          }
          .bottom {
            padding: 16px;
            width: 100%;
            height: 170px;
            background-color: #fff;
            border-radius: 4px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            .b_box {
              display: flex;
              .one {
                margin-right: 8px;
                width: 60px;
                font-size: 14px;
                color: rgba(62, 70, 79, 0.6);
              }
              .two {
                display: flex;
                align-items: center;
                span:not(:last-child) {
                  margin-right: 10px;
                }
              }
              .three {
                color: rgba(64, 158, 255, 1);
                display: flex;
                align-items: center;
              }
            }
          }
        }
      }
    }
  }
  .temp_box2 {
    .name {
      margin-bottom: 16px;
      font-size: 14px;
      color: rgba(62, 70, 79, 0.8);
      display: flex;
      align-items: center;
      div {
        margin-left: 12px;
        width: 341px;
        height: 32px;
        padding: 7px 12px;
        color: rgba(62, 70, 79, 1);
        background-color: rgba(91, 109, 128, 0.1);
      }
    }
  }
  .footer_btns {
    display: flex;
    justify-content: space-between;
  }
}

.formBox {
    // border: 1px solid rgba(247, 247, 247, 1);
    padding-bottom: 10px;
}

::v-deep .port_box{
  .boxone{
    padding: 16px;
    height: 184px;
    background-color: #f0f3fa;
    border-radius:4px ;
  }
  .drawer_sub_title{
    margin: 20px 0 12px 0 !important;
  }
}

//  隐藏设备列表
.hiddDev {
  width: 0px !important;
  padding: 0 !important;
}
// 展开分站列表
.openSub {
  width: 100% !important;
}
// 展开分站列表
.openCedian {
  width: 390px !important;
  .list_box{
    .item{
      margin-left: 0px !important;
    }
  }
}

.pagestyle {
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  .head {
    display: flex;
    justify-content: space-between;
    .tabs {
      width: 188px;
      display: flex;
      justify-content: space-between;
      color: rgba(62, 70, 79, 0.4);
      font-weight: 700;
      div {
        display: flex;
        align-items: center;
      }
    }
  }
  .container {
    height: calc(100% - 44px);
    .title {
      width: 260px;
      display: flex;
      color: rgba(62, 70, 79, 1);
    }
    .substation {
      height: 100%;
      display: flex;
      justify-content: space-between;
      .substationList {
        padding: 16px;
        width: calc(100% - 452px);
        height: 100%;
        background-color: rgba(255, 255, 255, 0.9);
        border-radius: 8px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        .list_head {
          display: flex;
          justify-content: space-between;
          .filter {
            display: flex;
            align-items: center;
          }
        }
        .list_box {
          height: calc(100% - 32px);
          overflow: auto;
          display: flex;
          flex-wrap: wrap;
          align-content: flex-start;
          .item {
            margin-left: 30px;
            margin-bottom: 12px;
            position: relative;
            padding: 12px 16px;
            width: 360px;
            height: 64px;
            background-color: #efeff0;
            display: flex;
            justify-content: space-between;
            border-radius: 4px;
            .img {
              width: 34px;
              height: 34px;
              position: relative;
              display: flex;
              align-items: center;
              .yc {
                position: absolute;
                bottom: -3px;
                right: -3px;
              }
            }
            .item_info {
              padding: 0 8px;
              width: 282px;
              height: 100%;
              font-size: 14px;
              color: rgba(62, 70, 79, 1);
              display: flex;
              flex-direction: column;
              justify-content: space-between;
              .info_name {
                font-size: 14px;
                font-weight: 700;
                display: flex;
                justify-content: space-between;
              }
              .info_data {
                display: flex;
                justify-content: space-between;
                .one {
                  width: 120px;
                  overflow: hidden;
                  text-overflow: ellipsis;
                  white-space: nowrap;
                }
                .two {
                  display: flex;
                  align-items: center;
                  span:first-child {
                    margin: 0px 8px 0 8px !important;
                  }
                  span:not(:last-child) {
                    margin: 0 8px 0 0;
                  }
                }
              }
            }
            .caozuo {
              position: absolute;
              top: 10px;
              right: 22px;
              width: 88px;
              z-index: 9;
              height: 132px;
              background-color: #fff;
              border-radius: 4px;
              font-size: 14px;
              border: 1px solid rgba(62, 70, 79, 0.1);
              .selects {
                height: 32px;
                display: flex;
                justify-content: center;
                align-items: center;
              }
              .selects:hover {
                background-color: #f2f3f4;
              }
            }
            .caozuo2{
              padding: 4px 8px;
              width: 102px;
              height: 106px;
              top:50px;
              right: 0;
              display: flex;
              flex-direction: column;
              justify-content: space-between;
              .selects2 {
                height: 30px;
                display: flex;
                // justify-content: space-between;
                align-items: center;
                span{
                  margin-left: 16px;
                }
              }
            }
            .yc_show{
              padding: 4px 8px 0;
              display: flex;
              flex-direction: column;
              position: absolute;
              top: 50px;
              left: 30px;
              font-size: 14px;
              background-color: #fff;
              border: 1px solid rgba(62, 70, 79, 0.1);
              border-radius: 4px;
              z-index: 9;
              .selects2{
                padding: 8px;
                margin-bottom: 4px;
                height: 30px;
                display: flex;
                align-items: center;
                img{
                  margin-right: 8px;
                }
              }
            }
          }
          .item:hover {
            background-color: #e9ebec;
            cursor: pointer;
          }
        }
      }
      .deviceList {
        padding: 16px;
        width: 440px;
        height: 100%;
        background-color: rgba(255, 255, 255, 0.9);
        border-radius: 8px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        transition: width 0.5s ease;
        .list_head {
          display: flex;
          justify-content: space-between;
          .filter {
            display: flex;
            align-items: center;
          }
        }
        .list_box {
          height: calc(100% - 32px);
          overflow: auto;
          .btns {
            height: 32px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            .shuaxin {
              font-size: 14px;
              display: flex;
              align-items: center;
            }
          }
          .items {
            padding: 12px 16px;
            height: 100px;
            font-size: 14px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            .one {
              display: flex;
              justify-content: space-between;
              align-items: center;
            }
            .two {
              height: 42px;
              display: flex;
              justify-content: space-between;
              position: relative;
              .vName{
                width: 55px;
                height: 42px;
                font-size: 14px;
                font-weight: 500;
                color: #77ba6a;
                display: flex;
                align-items: center;
                justify-content: center;
                background-color: #def2da;
              }
              .two_info {
                width: 305px;
                display: flex;
                justify-content: space-between;
                align-items: center;
                height: 100%;
                .info1 {
                  height: 100%;
                  display: flex;
                  flex-direction: column;
                  justify-content: space-between;
                  span {
                    font-size: 16px;
                    font-weight: 700;
                    color: #67c23a;
                  }
                  div:first-child {
                    width: 142px;
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
                  }
                }
                .info2 {
                  height: 100%;
                  display: flex;
                  flex-direction: column;
                  justify-content: space-between;
                }
                img {
                  width: 20px;
                  height: 20px;
                }
              }
              .tags {
                position: absolute;
                left: 0;
                bottom: 0;
                z-index: 9;
                height: 14px;
              }
            }
          }
          .nodata {
            margin: auto;
            width: 200px;
            height: 214px;
            font-size: 14px;
            color: rgba(182, 191, 204, 1);
            display: flex;
            flex-direction: column;
            align-items: center;
            img {
              width: 200px;
            }
          }
        }
      }
      .ceDianList {
        padding: 16px;
        width: calc(100% - 408px);
        height: 100%;
        background-color: rgba(255, 255, 255, 0.9);
        .cd_head {
          display: flex;
          justify-content: space-between;
          .filter {
            height: 32px;
            display: flex;
            align-items: center;
            div {
              margin: 0 0 0 8px;
              font-size: 14px;
              color: rgba(64, 158, 255, 1);
              display: flex;
              align-items: center;
            }
          }
        }
        .cd_box {
          height: calc(100% - 44px);
          overflow: auto;
          position: relative;
          .items {
            padding: 13px;
            height: 64px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: relative;
            cursor: pointer;
            .num {
              width: 40px;
              height: 40px;
              background: #f0f7ff;
              font-size: 16px;
              font-weight: 700;
              display: flex;
              align-items: center;
              justify-content: center;
            }
            .num2{
              background:none;
            }
            .cgq_img {
              width: 40px;
              height: 40px;
              background: #def2da;
              border-radius: 50px;
              display: flex;
              align-items: center;
              justify-content: center;
              overflow: hidden;
              img {
                width: 40px;
                // height: 28px;
              }
              .vName{
                font-size: 14px;
                font-weight: 500;
                color: #77ba6a;
              }
            }
            .items_info {
              width: 38%;
              height: 100%;
              display: flex;
              flex-direction: column;
              justify-content: space-between;
              .one {
                font-size: 14px;
                font-weight: 700;
              }
            }
            .data {
              width: 11%;
              height: 100%;
              display: flex;
              flex-direction: column;
              justify-content: space-between;
              font-size: 14px;
              div:nth-child(2) span {
                color: rgba(103, 194, 58, 1);
                font-size: 16px;
                font-weight: 700;
              }
            }
            .btn {
              width: 60px;
              height: 32px;
              background-color: #f3faf0;
              color: #67c23a;
              font-size: 14px;
              font-weight: 700;
              display: flex;
              align-items: center;
              justify-content: center;
            }
            .add {
              width: calc(100% - 56px);
              font-size: 14px;
              color: #409eff;
              display: flex;
              align-items: center;
              justify-content: center;
              cursor: pointer;
            }
            .zhijian{
              background-color: #f8f5fd !important;
              color: #ab7ae0 !important;
            }
            .btn2{
              width: 60px;
              height: 32px;
            }
          }
          .items2 {
            .infos {
              .one {
                font-size: 12px;
                color: rgba(62, 70, 79, 0.6);
              }
              .two {
                font-size: 14px;
                color: rgba(62, 70, 79, 1);
              }
            }
            .xq {
              color: rgba(64, 158, 255, 1);
              font-size: 14px;
            }
            .infos1 {
              width: 56px;
            }
            .infos2 {
              width: 112px;
            }
            .infos3 {
              width: 224px;
            }
          }
          .type_box {
              position: absolute;
              top: 46px;
              left: 650px;
              z-index: 9;
              padding: 4px 0;
              width: 116px;
              height: 104px;
              background-color: #fff;
              .t_item {
                width: 100%;
                height: 32px;
                font-size: 14px;
                color: rgba(62, 70, 79, 1);
                display: flex;
                align-items: center;
                justify-content: center;
              }
              .t_item:hover {
                cursor: pointer;
                background-color: #f0f3f4;
              }
            }
            .newPos{
              top: 0;
              left: 1075px;
            }
        }
      }
    }
    .channel {
      padding: 16px;
      height: 100%;
      background-color: #fff;
      display: flex;
      justify-content: space-between;
      .channels {
        width: 33.81%;
        height: 100%;
        .channels_head {
          display: flex;
          justify-content: space-between;
          .two {
            font-size: 14px;
            font-weight: 700;
            color: rgba(64, 158, 255, 1);
          }
        }
        .channels_box {
          margin:12px 0 0 0;
          max-height: calc(100% - 33px);
          overflow: auto;
          display: flex;
          flex-wrap: wrap;
          .items {
            margin: 0 12px 12px 0;
            width: 125px;
            height: 58px;
            color: rgba(62, 70, 79, 1);
            font-size: 16px;
            font-weight: 700;
            display: flex;
            justify-content: space-evenly;
            align-items: center;
            flex-direction: column;
            background-color: #f9f9fa;
            border-radius: 4px;
            cursor: pointer;
            .xj {
              font-size: 12px;
              color: rgba(62, 70, 79, 1);
              font-weight: normal;
              span {
                font-size: 14px;
                font-weight: 700;
                color: rgba(64, 158, 255, 1);
              }
            }
          }
        }
      }
      .subchannel {
        width: 65.36%;
        height: 100%;
        display: flex;
        flex-direction: column;
        .subchannel_head {
          display: flex;
          justify-content: space-between;
          .two {
            font-size: 14px;
            font-weight: 700;
            color: rgba(64, 158, 255, 1);
            cursor: pointer;
          }
        }
        .subchannel_box{
          margin: 18px 0 0 0;
          max-height: calc(100% - 57px);
          display: flex;
          flex-wrap: wrap;
          .s_item{
            padding: 12px 16px;
            margin: 0 12px 16px 0;
            width: calc((100% / 3) - 12px);
            height: 64px;
            background-color: #f9f9fa;
            border-radius: 4px;
            display: flex;
            justify-content: space-between;
            position: relative;
            cursor: pointer;
            .left{
              width: 56px;
              height: 100%;
              display: flex;
              flex-direction: column;
              justify-content: space-between;
              font-size: 14px;
              color: rgba(62, 70, 79, 1);
              .stationCode{
                font-weight: 700;
              }
            }
            .right{
              width: calc(100% - 72px);
              height: 100%;
              display: flex;
              flex-direction: column;
              justify-content: space-between;
              font-size: 14px;
              color: rgba(62, 70, 79, 1);
            }
            .img{
              position: absolute;
              right: 0;
              bottom:0;
            }
          }
        }
      }
      .line{
        margin:0 8px;
        width: 1px;
        height: 100%;
        background-color: rgba(91, 109, 128, 1);
      }
    }
  }
}
</style>
